public override object VisitProcedureDecl([NotNull] SLangGrammarParser.ProcedureDeclContext context) { InitRoutines(context.thisHeader(), context.Id().GetText()); TranslateRoutines(context.statementSeq()); currentRoutine = null; currentType = null; return(null); }
public override object VisitProcedureDecl([NotNull] SLangGrammarParser.ProcedureDeclContext context) { var symbol = context.Id().Symbol; InitializeRoutineStates(context.thisHeader(), symbol); CheckParamsNameConflicts(context.thisHeader(), context.routineArgList()); // some work... need to call visit()? Visit(context.statementSeq()); currentType = null; currentRoutine = null; return(null); }
// same as functions only without return type (maybe i can optimize that later) public override object VisitProcedureDecl([NotNull] SLangGrammarParser.ProcedureDeclContext context) { ValidateContext(context.thisHeader(), context.Id(), context.importHead(), context.AccessModifier(), context.Abstract(), context.Override(), context.routineArgList(), null, context.statementSeq()); return(base.VisitProcedureDecl(context)); }