コード例 #1
0
 public override object VisitProcedureDecl([NotNull] SLangGrammarParser.ProcedureDeclContext context)
 {
     InitRoutines(context.thisHeader(), context.Id().GetText());
     TranslateRoutines(context.statementSeq());
     currentRoutine = null;
     currentType    = null;
     return(null);
 }
コード例 #2
0
        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);
        }
コード例 #3
0
        // 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));
        }