Added keyword c:xxx: to express that we want the concept, not its body
This commit is contained in:
@@ -86,7 +86,12 @@ class BaseParser:
|
||||
if not hasattr(tokens, "__iter__"):
|
||||
tokens = [tokens]
|
||||
|
||||
switcher = {
|
||||
TokenKind.KEYWORD: lambda t: Keywords(t.value).value,
|
||||
TokenKind.CONCEPT: lambda t: f"__C__{t.value}__C__"
|
||||
}
|
||||
|
||||
for token in tokens:
|
||||
value = Keywords(token.value).value if token.type == TokenKind.KEYWORD else token.value
|
||||
value = switcher.get(token.type, lambda t: t.value)(token)
|
||||
res += value
|
||||
return res
|
||||
|
||||
Reference in New Issue
Block a user