Пример #1
0
 class ListNode(FooNode):
     nb_list = Field()
     prop = Property(expr)
Пример #2
0
 class Name(FooNode):
     tok = Field()
Пример #3
0
class LiteralSequence(FooNode):
    name = Field()
    items = Field()

    prop = Property(New(SynthNode, name=Self.name, items=Self.items),
                    memoized=True)
Пример #4
0
 class Compound(Expression):
     prefix = Field()
     suffix = Field()
Пример #5
0
class IndentNode(FooNode):
    lit_1 = Field()
    lit_2 = Field()
Пример #6
0
class Literal(FooNode):
    tok = Field()
Пример #7
0
class ListNode(FooNode):
    items = Field()
Пример #8
0
class Plus(Expression):
    left = Field()
    right = Field()

    result = Property(Self.left.result + Self.right.result)
Пример #9
0
class Literal(FooNode):
    tok = Field()

    a = AbstractProperty(runtime_check=True, type=FooNode.env_el())

    b = Property(Self.a.cast(BarNode.env_el()))
Пример #10
0
class Def(Stmt):
    id = Field()
    body = Field()

    env_spec = EnvSpec(add_env=True,
                       add_to_env=add_to_env(Self.id.symbol, Self))
Пример #11
0
class Name(FooNode):
    tok = Field(type=T.Token)
Пример #12
0
class Names(Struct):
    label = Field(type=T.Name)
    name_list = Field(type=T.Name.array_type())
Пример #13
0
 class NumberNode(FooNode):
     tok = Field()
Пример #14
0
class Literal(Expression):
    tok = Field()

    result = ExternalProperty()
Пример #15
0
class Num(FooNode):
    field = Field()
Пример #16
0
class Name(Expression):
    tok = Field()

    designated_unit = ExternalProperty(type=AnalysisUnitType)
    result = Property(Self.designated_unit.root.cast(Expression).result)
Пример #17
0
 class UnreferencedNode(FooNode):
     untyped_field = Field()
Пример #18
0
class NewLineNode(FooNode):
    lit_1 = Field()
    lit_2 = Field()
Пример #19
0
 class MyStruct(Struct):
     a = Field(type=LongType)
     b = Field(type=LongType)
Пример #20
0
class CompositeNode(FooNode):
    lit_1 = Field()
    lit_2 = Field()
    lit_3 = Field()
    lit_4 = Field()
Пример #21
0
 class Def(FooNode):
     name = Field()
     body = Field()
     env_spec = EnvSpec(add_env=True, add_to_env=(Self.name, Self))
Пример #22
0
class SynthNode(FooNode):
    name = Field(type=Token)
    items = Field(type=Literal.list_type())
Пример #23
0
class Block(Stmt):
    items = Field()

    env_spec = EnvSpec(add_env=True)
Пример #24
0
 class Number(Expression):
     tok = Field()
Пример #25
0
    class Example(FooNode):
        name = Field()

        prop = Property(expr_fn)
Пример #26
0
    class ExampleNode(FooNode):
        body = Field()

        prop = Property(match_expr)
Пример #27
0
 class BarNode(FooNode):
     list_node = Field()