118 Commits

Author SHA1 Message Date
Clément Fournier
3c1b0afcf6 Fix #2783 2020-09-16 15:40:45 +02:00
Clément Fournier
fc759db5ca Fix #2767
Problem was the stack is empty if the local var declaration
is the first node of the compilation unit to be pushed.
2020-09-10 12:24:03 +02:00
XenoAmess
244a39db0f fix typos. 2020-08-27 11:47:11 +08:00
Clément Fournier
2e1e0ed3a4 Rename PermittedSubclasses to PermitsList 2020-08-22 19:30:38 +02:00
Andreas Dangel
67b37de334 [java] Rework BlockStatement to allow local interfaces, enums, ... 2020-08-16 21:42:36 +02:00
Andreas Dangel
fceb474df0 [java] Remove "non-sealed" token and use semantic lookahead instead 2020-08-16 18:22:45 +02:00
Andreas Dangel
0d9b5a7c3b [java] Support Sealed Classes with Java 15 Preview 2020-08-14 22:16:41 +02:00
Andreas Dangel
cda155891a [java] Add ugly lookahead for local record declarations
so that it can be distinguished from local var decl or other
statements.
2020-08-14 20:56:26 +02:00
Andreas Dangel
4d2853ccc4 [java] Add support for local records (Java 15 Preview) 2020-08-14 18:55:00 +02:00
Andreas Dangel
e51519c5fd [java] Support Records with Java 15 Preview 2020-08-13 20:42:08 +02:00
Andreas Dangel
e596a67297 [java] Support Pattern Matching for instanceof with Java 15 Preview. 2020-08-13 20:11:25 +02:00
Andreas Dangel
40f0eedf88 [java] Text Blocks are now a permanent language feature with JDK 15 2020-08-13 20:05:54 +02:00
Andreas Dangel
02a78f5bea [java] Add versions 15 (new default) and 15-preview, remove 13-preview 2020-08-13 19:15:02 +02:00
Andreas Dangel
69ed0464a7 Merge branch 'pr-2385'
[java] Make yield statements more conditional #2385

Fixes #2319
2020-04-04 18:20:49 +02:00
Clément Fournier
e1a4b8ae97 Forbid type params for record ctors 2020-03-28 11:43:20 +01:00
Clément Fournier
b01d4dc0d7 Test 2020-03-28 11:36:42 +01:00
Clément Fournier
9e9c370a4a Make yield more conditional
Refs #2319
2020-03-28 11:36:38 +01:00
Clément Fournier
f698a2e7aa Small API improvements for records 2020-03-02 22:24:44 +01:00
Clément Fournier
18cc6a3e4e Disallow throws clause on record constructor 2020-03-02 20:46:40 +01:00
Clément Fournier
fc0b437ad7 Fix record ctor with throws 2020-03-02 19:00:59 +01:00
Andreas Dangel
f1fe8ce5e1 [java] Remove version java 12 preview
Keep the tests and move them to java 14
except for the break expression
2020-02-28 19:37:13 +01:00
Andreas Dangel
ee211d42b1 [java] Remove unneccessary annotation parsing 2020-02-28 19:07:03 +01:00
Andreas Dangel
7d3df99134 [java] RecordBody - test with more annotation and use deep lookahead
Record constructors are not allowed to throw exceptions.
2020-02-28 18:41:22 +01:00
Andreas Dangel
0ecd1da200 [java] Get rid of RecordBodyDeclaration node 2020-02-28 18:32:33 +01:00
Andreas Dangel
fa28aa7e23 [java] Test annotations with RecordComponents 2020-02-28 17:59:39 +01:00
Andreas Dangel
e017def280 [java] Support vararg/array in RecordComponent and empty components 2020-02-28 17:35:44 +01:00
Andreas Dangel
5f43e198d5 [java] RecordConstructorDeclaration - do not use Name() 2020-02-28 17:01:57 +01:00
Andreas Dangel
9917e3f422 [java] RecordComponents -> RecordComponentList 2020-02-28 16:56:43 +01:00
Andreas Dangel
e2d84d6741 [java] Add grammar jdoc for new Record types 2020-02-28 16:50:57 +01:00
Andreas Dangel
8a224462fd [java] Add initial support for Java 14 Preview record types 2020-02-28 14:58:52 +01:00
Andreas Dangel
adfb2ab129 [java] Update grammar 2020-02-28 10:51:38 +01:00
Andreas Dangel
9a80f13164 [java] Fix new escape sequence "\s" detection 2020-02-27 21:23:33 +01:00
Andreas Dangel
d16751d136 [java] Add support for TextBlocks in Java14
* New escape sequence "\s" added
* Added experimental ASTLiteral::getTextBlockContent to retrieve
  the text block with stripped indentation
2020-02-27 21:11:02 +01:00
Andreas Dangel
9d5b7554f0 [java] Make sure, SwitchExpressions with yield work with java14
Add additional tests for java14, so that we can later simply remove
the java13 preview tests
2020-02-27 18:30:39 +01:00
Clément Fournier
ad023e8fa6 Support type test patterns 2020-02-09 00:10:50 +01:00
Clément Fournier
d91e626a0b Format idents in java grammar 2020-01-25 10:59:57 +01: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
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
Clément Fournier
94afed80df Fix ambiguity with switch 2019-05-30 15:48:55 +02:00
Clément Fournier
39921f40b4 Add to grammar changelog 2019-05-30 15:06:50 +02:00
Clément Fournier
10158751d2 Fix local class modifiers being forgotten 2019-05-30 14:53:16 +02:00
Clément Fournier
ae8ba5128b Fix annotated module declaration 2019-05-25 07:27:59 +02:00
Andreas Dangel
ec68c2979c [java] avoid most lookaheads for SwitchStatements 2019-03-31 10:33:02 +02:00
Andreas Dangel
f8652fbf9a [java] Add SwitchLabeledRule interface, remove SwitchBlockGroup 2019-03-31 00:21:34 +01:00
Andreas Dangel
65b2990ad1 Fix break statement 2019-03-17 10:22:11 +01:00