Raphael Amiard
25f795d386
PC19-012: Keep offset in tokens
2016-12-19 12:55:06 +01:00
Raphael Amiard
9e2a1f48bd
PC15-028: remove Children_Count
2016-12-19 12:55:06 +01:00
Pierre-Marie de Rodat
9298a8e7d1
Minor reformatting
...
Change-Id: Id5683d56a3eaddf5da989a146397333a56a0d3e3
TN: PC15-028
2016-12-15 15:30:08 +01:00
Pierre-Marie de Rodat
28753a1870
Properly handle synthetic nodes in the Sloc_Range primitive
...
Change-Id: Ib1ac4cd1badd1c7b4453e683333aae90b99eb2a7
TN: PB18-030
2016-12-15 15:24:53 +01:00
Pierre-Marie de Rodat
103925eda6
Add testcases for AST node synthetization in properties
...
Change-Id: Iea819d1dc0f727d17f02adfa82629272641390da
TN: PB18-030
2016-12-15 15:24:53 +01:00
Pierre-Marie de Rodat
c33615e02c
Introduce CompiledType.convert_to_storage_expr
...
Compiled types can be actually be mapped to two types in the generated
code: the default one and the one stored in AST nodes. For these, we
need to convert default-typed values to the storage-typed ones. This
commit intoduces a facility to do that.
This provides an implementation for tokens and leaves the one for logic
variables unimplemented.
Change-Id: If93240383dc2e6db4391ce338dfc2831c3116b14
TN: PB18-030
2016-12-15 15:20:57 +01:00
Pierre-Marie de Rodat
2185848f6a
expressions.structs.New: enhance to support AST node synthetization
...
Change-Id: Ieafb089cdf916c60e19bac3f34ec3d740a11b950
TN: PB18-030
2016-12-15 15:20:57 +01:00
Pierre-Marie de Rodat
f3daa5c589
Introduce a Register_Destroyable helper for synthetized AST nodes
...
Change-Id: I4f29ffe41d6693180e606dbacc0063a928cd23e5
TN: PB18-030
2016-12-15 15:20:57 +01:00
Pierre-Marie de Rodat
db141d5f2c
Split single-node Destroy primitive and whole-tree one
...
As of today, the AST node destruction primitive (Destroy) destroys a
node *and* all its children recursively. For the upcoming node
synthetization feature, we would like to be able to destroy only a
single node at a time.
This change intoduces a new Destroy_Node primitive and make the current
Destroy one class-wide, to use Destroy_Node and to be the one doing the
recursion.
Change-Id: I1ba06a3c7e24c658340e6ed7082f9a41a26e09c9
TN: PB18-030
2016-12-15 12:57:27 +01:00
Pierre-Marie de Rodat
da1f73239b
expressions.structs: rename New.Expr to New.StructExpr
...
Change-Id: I31882188db77e0b009c7d8ade0fba30ad861f301
TN: PB18-030
2016-12-15 12:57:27 +01:00
Pierre-Marie de Rodat
64d37c4b2e
Fix codegen so that memoization works on non-refcounted types
...
Change-Id: Ie8403efc8dee9994ac8d1ccfed04ddb65f225eef
TN: PB18-030
2016-12-15 10:45:40 +01:00
Pierre-Marie de Rodat
5a4be4d87c
expressions.structs.New: update fields filter for AST node synth.
...
Accept only Fields and UserField, excluding BuiltinFields. The latters
will be automatically initialized.
Change-Id: Idf35d83aabb8364f5e91d0e55737874dfa418c25
TN: PB18-030
2016-12-15 10:45:40 +01:00
Pierre-Marie de Rodat
781b2af53b
Accept AST nodes not used by the grammar but still type annotated
...
Change-Id: I53251b39c2f1cc36f20af33fe19a1496e1f500d1
TN: PB18-030
2016-12-15 10:45:40 +01:00
Pierre-Marie de Rodat
fb90f8918e
langkit.expressions.structs.New: handle deferred types
...
Change-Id: Ic520b3487f6eea96bf2a4affccbf9be02e48fa21
TN: PB18-030
2016-12-15 10:35:12 +01:00
Pierre-Marie de Rodat
52943ae32a
Clean a docstring in parsers.py
...
Change-Id: Ibce4ad4dff10f962b26fad3938023061b8fe7bfb
TN: minor
2016-12-15 10:35:12 +01:00
Pierre-Marie de Rodat
0b45b66396
Add a testcase for badly typed top-level grammar rules
...
Change-Id: I195ab9980f31e13d99a4c712f529e2c15d7ef4a9
TN: PB18-030
2016-12-15 10:35:12 +01:00
Pierre-Marie de Rodat
e952ed084b
Emit a diagnostic when top-level grammar rules don't yield AST node
...
Change-Id: I30581d61829ebf722797c215213bc960300846d0
TN: PB18-030
2016-12-15 10:35:12 +01:00
Pierre-Marie de Rodat
61059b86ce
Minor reformatting
...
Change-Id: I73785a8210477591e8b43b4f4e41f853bd943ff3
TN: minor
2016-12-14 15:29:28 +01:00
Pierre-Marie de Rodat
962fc6276e
Minor reformatting
...
Change-Id: I1c3298ca39dd54937c91cb5b50e134950e2634e9
TN: minor
2016-12-14 12:58:24 +01:00
Pierre-Marie de Rodat
dbbd185221
Make Langkit_Support.Tree_Traversal_Iterator.Traverse_Iterator limited
...
Change-Id: I6cf66236032ee08f88c4f84190ce49fbcc9ef922
TN: PC14-003
2016-12-14 12:56:53 +01:00
Pierre-Marie de Rodat
7e4054987c
Fix a typo
...
Change-Id: Ie80bcc79d3be286c1a5227f30400969e6ac74706
TN: minor
2016-12-14 12:24:42 +01:00
Pierre-Marie de Rodat
30695df137
Fix a typo
...
Change-Id: I68dc269c9c6e9c9fb981c9b711f2c241357d4ad3
TN: minor
2016-12-14 12:24:40 +01:00
Raphael Amiard
78c381a0f5
P506-012: Comment Update_After_Reparse
2016-12-14 12:15:19 +01:00
Raphael Amiard
80ce2eff08
P506-012: Call Reroot_Foreign_Nodes after reparse
2016-12-14 12:08:05 +01:00
Raphael Amiard
fbf067e7a3
Minor: whitespace
2016-12-14 12:08:05 +01:00