I can now use keyword in concept definition and parsing
This commit is contained in:
@@ -34,6 +34,7 @@ cmap = {
|
||||
"foo bar": Concept("foo bar(a)").def_var("a"),
|
||||
"long infixed": Concept("a long infixed b").def_var("a").def_var("b"),
|
||||
"twenties": Concept("twenties", definition="'twenty' (one|two)=unit").def_var("unit"),
|
||||
"is a concept": Concept("c is a concept").def_var("c"),
|
||||
}
|
||||
|
||||
|
||||
@@ -1013,6 +1014,8 @@ class TestSyaNodeParser(TestUsingMemoryBasedSheerka):
|
||||
]),
|
||||
("function(suffixed x$!#)", False, [
|
||||
SCWC("function(", ")", CNC("suffixed", 2, 7, a="x$!#"))]),
|
||||
("one is a concept", True, [CNC("is a concept", c="one")]),
|
||||
("a is a concept", False, [CNC("is a concept", c=UTN("a"))]),
|
||||
])
|
||||
def test_i_can_parse_when_one_result(self, text, expected_status, expected_result):
|
||||
sheerka, context, parser = self.init_parser()
|
||||
@@ -1142,3 +1145,4 @@ class TestSyaNodeParser(TestUsingMemoryBasedSheerka):
|
||||
|
||||
assert not res.status
|
||||
assert sheerka.isinstance(res.body, BuiltinConcepts.IS_EMPTY)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user