With the code: var foo = true, swift parses this into the following AST: (pattern_binding_decl (pattern_named 'foo') (boolean_literal_expr type='<null>' value=true)) (var_decl "foo" type='<null type>' storage_kind=stored)))
I'm wondering why VarDecl and PatternBindingDecl are separate nodes in the tree and not nested somehow, as they both represent similar things..? Might be a trivial question as I'm not a compiler guru. I'm porting parts of the AST representation to another language for a project. Thanks!
_______________________________________________ swift-dev mailing list swift-dev@swift.org https://lists.swift.org/mailman/listinfo/swift-dev