Example #1
0
        private void InitializeRoutineStates(SLangGrammarParser.ThisHeaderContext context, IToken symbol)
        {
            currentType = context != null?Visit(context.customType()) as SlangCustomType : null;

            if (currentType != null)
            {
                currentRoutine = Table.FindClass(currentType).Methods[symbol.Text];
            }
            else
            {
                currentRoutine = moduleItem.Routines[symbol.Text];
                checkDefinitions[symbol.Text] = true;
            }
        }
Example #2
0
 private void InitRoutines(SLangGrammarParser.ThisHeaderContext thisHeader, string routineName)
 {
     if (thisHeader != null)
     {
         currentType = GetCustomTypeContext(thisHeader.customType());
     }
     if (currentType != null)
     {
         currentRoutine = source.FindClass(currentType).Methods[routineName];
     }
     else
     {
         currentRoutine = currentModule.Routines[routineName];
     }
 }
 public override object VisitThisHeader([NotNull] SLangGrammarParser.ThisHeaderContext context) => Visit(context.customType());