Пример #1
0
 public static List <LexicalComponent> ObtainComponent(ComponentType componentType)
 {
     return(componentType switch
     {
         ComponentType.Symbol => SymbolsTable.ObtainAllSymbols(),
         ComponentType.ReservedKeyword => ReservedKeywordsTable.ObtainAllSymbols(),
         ComponentType.Dummy => DummiesTable.ObtainAllSymbols(),
         ComponentType.Literal => LiteralsTable.ObtainAllSymbols(),
         _ => throw new Exception("Unsupported lexical component type")
     });