internal SymbolReference CreateSymbolReference(CodeElementsParser.SymbolReference4Context context, SymbolType symbolType)
 {
     AlphanumericValue nameLiteral = CreateAlphanumericValue(context.alphanumericValue4());
     var symbolReference = new SymbolReference(nameLiteral, symbolType);
     symbolInformationForTokens[nameLiteral.Token] = symbolReference;
     return symbolReference;
 }
 internal AmbiguousSymbolReference CreateAmbiguousSymbolReference(CodeElementsParser.AmbiguousSymbolReference4Context context, SymbolType[] candidateTypes)
 {
     var nameLiteral = CreateAlphanumericValue(context.alphanumericValue4());
     var ambiguousSymbolReference = new AmbiguousSymbolReference(nameLiteral, candidateTypes);
     symbolInformationForTokens[nameLiteral.Token] = ambiguousSymbolReference;
     return ambiguousSymbolReference;
 }
 internal ExternalNameOrSymbolReference CreateExternalNameOrSymbolReference(CodeElementsParser.ExternalNameOrSymbolReference4Context context, SymbolType[] candidateTypes)
 {
     AlphanumericValue nameLiteral = CreateAlphanumericValue(context.alphanumericValue4());
     var externalNameOrSymbolReference = new ExternalNameOrSymbolReference(nameLiteral, candidateTypes);
     symbolInformationForTokens[nameLiteral.Token] = externalNameOrSymbolReference;
     return externalNameOrSymbolReference;
 }
Example #4
0
 internal SymbolReference CreateSymbolReference(CodeElementsParser.SymbolReference12Context context, SymbolType symbolType)
 {
     AlphanumericValue nameLiteral = null;
     if (context.alphanumericValue4() != null)
     {
         nameLiteral = CreateAlphanumericValue(context.alphanumericValue4());
     }
     else if(context.DATE() != null)
     {
         nameLiteral = new AlphanumericValue(ParseTreeUtils.GetFirstToken(context.DATE()));
     }
     var symbolReference = new SymbolReference(nameLiteral, symbolType);
     symbolInformationForTokens[nameLiteral.Token] = symbolReference;
     return symbolReference;
 }