X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/2bfb909dde1241111ab5568f30c45d2644bdaf25..5b211a176c805745d48517eff99c4dd651f2da75:/lunaix-os/scripts/build-tools/lcfg2/rules.py diff --git a/lunaix-os/scripts/build-tools/lcfg2/rules.py b/lunaix-os/scripts/build-tools/lcfg2/rules.py index 35f770f..0297b55 100644 --- a/lunaix-os/scripts/build-tools/lcfg2/rules.py +++ b/lunaix-os/scripts/build-tools/lcfg2/rules.py @@ -9,21 +9,15 @@ class SyntaxRule(RuleCollection): ctx=ast.Store) TrivialValue = Schema(Schema.Union( ast.Constant, - ast.Name, - Schema(ast.Subscript, - value=Schema(ast.Name, id='__lzLut__'), - slice=ast.Constant) + ast.Name )) BoolOperators = Schema(Schema.Union(ast.Or, ast.And)) TrivialTest = Schema(ast.Compare, left=TrivialValue, - ops=[Schema.Union(ast.Eq, ast.In)], - comparators=[Schema.Union( - ast.Constant, - Schema(ast.List, elts=Schema.List(ast.Constant)) - )]) + ops=[Schema.Union(ast.Eq)], + comparators=[ast.Constant]) InlineIf = Schema(ast.IfExp, test=Schema.Union(TrivialTest, TrivialValue), @@ -38,8 +32,8 @@ class SyntaxRule(RuleCollection): TrivialReturn = Schema(Schema.Union( TrivialValue, + TrivialTest, InlineIf, - TrivialLogic, ast.JoinedStr ))