public override bool Visit(AstReturnStatement node) { ErrorIfIsNull(node.Expression); return true; }
public override bool Visit(AstReturnStatement node) { return true; }
// #STATEMENT RETURN #EXPRESSION LINE_END private void ConstructReturnStatement() { var expr = nodes.Pop() as AstExpression; var returnStmt = new AstReturnStatement(expr); PushNode(returnStmt); }
public override bool Visit(AstReturnStatement node) { node.Expression.Accept(this); codeStream.WriteLine("ret " + currReturnType + " " + GetCurrUnnamedVariable()); CreateUnnamedVariable(); return false; }
public override bool Visit(AstReturnStatement node) { if (currFunctionReturnType != null) { var type = resolver.Resolve(node.Expression); if (type != currFunctionReturnType) { DispatchError(node.TextPosition, "Return value(" + type + ") does not match function return type(" + currFunctionReturnType + ")"); return false; } } return true; }
public abstract bool Visit(AstReturnStatement node);