Skip to content

Commit

Permalink
Merge pull request #105 from Eclalang/issue-#102-implement-murloc-token
Browse files Browse the repository at this point in the history
add murloc stmt in interpretor
  • Loading branch information
mkarten authored Dec 13, 2023
2 parents 30c3e78 + 769d05d commit e825151
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions interpreter/Stmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -432,3 +432,8 @@ func RunReturnStmt(tree parser.ReturnStmt, env *Env) []eclaType.Type {
}
return l
}

// RunMurlocStmt executes a parser.MurlocStmt.
func RunMurlocStmt(stmt parser.MurlocStmt, env *Env) {
env.ErrorHandle.HandleError(0, stmt.StartPos(), "Mrgle, Mmmm Uuua !", errorHandler.LevelFatal)
}
3 changes: 3 additions & 0 deletions interpreter/expr.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ func RunTree(tree parser.Node, env *Env) []*Bus {
temp = append(temp, NewReturnBus(v))
}
return temp
case parser.MurlocStmt:
RunMurlocStmt(tree.(parser.MurlocStmt), env)
}

return []*Bus{NewNoneBus()}
}

Expand Down

0 comments on commit e825151

Please sign in to comment.