Clément Fournier
76439a47f2
Use a single node for unary exprs
2019-12-09 15:12:09 +01:00
Clément Fournier
c7da6e94b2
Merge branch 'java-grammar' into grammar-prefix-postfix
2019-11-19 16:22:12 +01:00
Clément Fournier
585e123c09
Cleanup
2019-11-19 03:58:32 +01:00
Clément Fournier
1c6e57b5db
Fix tests
2019-11-19 03:43:46 +01:00
Clément Fournier
b9882c4268
Remove abstract java parser
2019-11-19 03:43:46 +01:00
Clément Fournier
ac2b77b472
Pull version checks out of the parser
2019-11-19 03:43:46 +01:00
Clément Fournier
b154c5e3ee
Remove irrelevant changes
2019-10-08 01:47:38 +02:00
Clément Fournier
6a6f20d899
Make getEnclosingClass always resolved
2019-10-08 01:47:38 +02:00
Clément Fournier
f5cc4f919a
Reduce visibility
2019-10-08 01:47:38 +02:00
Clément Fournier
8140ae9cbc
Extract suppressor interface
2019-10-07 00:01:31 +02:00
Clément Fournier
3c31b2df30
Merge branch 'java-grammar' into grammar-method-alignment
2019-10-05 14:56:19 +02:00
Clément Fournier
a62ecf0f4c
Merge branch 'java-grammar' into grammar-method-alignment
2019-10-05 14:50:27 +02:00
Clément Fournier
d56f61b9aa
Merge branch 'java-grammar' into grammar-type-expr
2019-09-30 15:49:18 +02:00
Clément Fournier
1258db21ea
Use better names for assignment operators
...
Also, %= had been forgotten
2019-09-30 15:47:29 +02:00
Clément Fournier
341a833ee7
Remove InstanceOfExpression, use regular InfixExpression
2019-09-30 12:08:15 +02:00
Clément Fournier
e3e0911ca4
Use throwslist instead of namelist
2019-09-27 06:24:26 +02:00
Clément Fournier
9efe40f729
Merge branch 'java-grammar-merged' into grammar-method-alignment
2019-09-26 06:05:39 +02:00
Clément Fournier
b769629a10
Split UnaryExpr into Prefix and Postfix
...
Among the different possible categorisations
of unary expressions, this is probably the
most logical and easiest to document.
Here's a comparison of different possible
categorisations. Note: `_++` is the postfix
increment operator, while `++_` is the prefix
one - idem for decrement. The last one is the
one implemented by this commit.
\## 6.0.x
```
Unary = { -, + }
UnaryNotPlusMinus { !, ~ }
PreIncrement = { ++_ }
PreDecrement { --_ }
Postfix { _++, _++ }
```
* Very assymmetric, splits operators based on parsing
concerns
\## Before #1890 :
```
Unary = { -, + , !, ~ }
PreIncrement = { ++_ }
PreDecrement { --_ }
Postfix { _++, _++ }
```
* Minor simplification
\## #1890 :
```
Unary = Prefix \ { ++_, --_ })
Increment ( { ++ , -- } x (postfix, prefix) )
```
* Names are weird (IncrementExpr may be decrement, Unary != Increment
even though semantically, Increment \subset Unary)
* No possibility to introduce a supertype (what would it be?)
* But easy to match all increment/decrement expressions
\## JLS (also, Eclipse):
```
Prefix = { !, ~, -, +, ++_, --_ }
Postfix = { _++, _-- }
```
* Both can have super interface UnaryExpr
* This allows matching all increment/decrement expressions easily too
* Easiest to document, JLS like, AST like
* Fits well with `InfixExpr`
2019-09-26 05:57:30 +02:00
Clément Fournier
d4b0440c7f
Treat instanceof expression as an infix expression
2019-09-26 05:53:53 +02:00
Clément Fournier
fbebe72bc0
Merge branch 'grammar-array-dims' into java-grammar
2019-09-26 05:44:11 +02:00
Clément Fournier
8b7ecd7576
Merge branch 'grammar-receiver' into java-grammar
2019-09-26 05:44:03 +02:00
Clément Fournier
8d47824b41
Merge branch 'java-grammar' into grammar-left-recursive-ops
2019-09-25 22:59:37 +02:00
Clément Fournier
6a04f6af25
Merge branch 'java-grammar' into grammar-array-dims
2019-09-25 22:55:50 +02:00
Clément Fournier
f702295e24
Merge branch 'java-grammar' into grammar-receiver
2019-09-25 22:55:11 +02:00
Clément Fournier
0f13725b3d
Use kotlin tests for text blocks
2019-09-14 16:25:44 +02:00
Clément Fournier
7b7fc2bd75
Fix merge
2019-09-14 15:36:12 +02:00
Clément Fournier
88e3a88cd8
Adapt text blocks to new grammar
...
They're parsed as StringLiteral nodes.
2019-09-14 15:31:03 +02:00
Clément Fournier
dc7d990280
Merge branch '7.0.x' into java-grammar
2019-09-14 15:14:22 +02:00
Andreas Dangel
eba98b3898
Fixes from review, refs #1973
2019-09-12 20:22:45 +02:00
Andreas Dangel
970c86f557
[java] Introduce language version 12-preview and 13-preview
2019-09-11 20:36:29 +02:00
Andreas Dangel
09a183702c
Revert "[java] Remove java12 break-with-expression support"
...
This reverts commit 2ba142274717238ee0862eed4aa2df3de2070218.
2019-09-07 10:13:02 +02:00
Andreas Dangel
f3e4a77105
[java] Adjust grammar for text blocks
...
Refs #1973
2019-09-06 15:21:08 +02:00
Clément Fournier
8d50f3592d
Represent annotation methods directly with method declarations
2019-08-16 14:06:39 +02:00
Clément Fournier
4660e22a48
Remove MethodDeclarator, align constructor declaration and methodDeclaration
...
* Remove ASTConstructorDeclaration::getParameters -> use getFormalParameters
* Remove ASTConstructorDeclaration::getParameterCount -> use getArity
* Remove MethodDeclarator from MethodDeclaration grammar, deprecate node class
* Add an ASTBlock to ASTConstructorDeclaration grammar and
ASTMethodOrConstructorDeclaration::getBody
* Remove ASTMethodDeclaration::getBlock in favour of getBody
2019-08-16 14:02:46 +02:00
Clément Fournier
84bc03eb08
Rename to ArrayDimensions
2019-08-15 17:39:44 +02:00
Clément Fournier
00649ac5d9
Merge ArrayAllocationDims with ArrayTypeDims
...
This simplifies the grammar of allocation expressions,
they now have an array type as a child
2019-08-15 17:27:16 +02:00
Clément Fournier
92e0b4114d
Fix lookaheads
2019-08-15 14:25:42 +02:00
Clément Fournier
86cb07cfad
Revert changes to annotation methods
2019-08-15 13:55:56 +02:00
Clément Fournier
121d4c7942
Deal with receiver parameter explicitly
2019-08-15 13:55:56 +02:00
Clément Fournier
7b9ccffca6
Make expressions left-recursive, merge them into a single node
2019-08-14 21:53:05 +02:00
Andreas Dangel
2ba1422747
[java] Remove java12 break-with-expression support
...
This preview language feature has been replaced with
the yield statement in java 13.
2019-08-13 20:48:06 +02:00
Andreas Dangel
b110186ed7
[java] Add Java 13 support
...
* Add text block literal
2019-08-13 20:00:40 +02:00
Andreas Dangel
969972214c
[java] Add Java 13 support
...
* Java 13 is the new default
* New yield statement
2019-08-13 18:42:40 +02:00
Andreas Dangel
8f8b445a6e
Merge branch 'pr-1897' into java-grammar
2019-08-06 16:31:40 +02:00
Clément Fournier
ec57361a7f
Cleanup grammar as suggested by adangel
...
Rename ResourceSpecification production to ResourceList,
remove Resources production
2019-08-06 02:04:41 +02:00
Clément Fournier
ca604ea678
Merge branch 'java-grammar' into grammar-assignable-expression
2019-08-06 01:24:32 +02:00
Clément Fournier
425af935ae
Merge branch 'java-grammar' into grammar-improve-resource
2019-07-31 15:49:39 +02:00
Andreas Dangel
afc206d439
Merge branch 'pr-1888' into java-grammar
2019-07-28 19:09:55 +02:00
Clément Fournier
682da633dd
Merge branch 'java-grammar' into grammar-improve-resource
2019-07-28 18:59:11 +02:00
Clément Fournier
ac7e2a8d08
Fix node name
2019-07-28 18:37:15 +02:00