Skip to content

Commit

Permalink
[NETBEANS-5599] PHP 8.1 Support: Enumerations (Part 1)
Browse files Browse the repository at this point in the history
- https://issues.apache.org/jira/browse/NETBEANS-5599
- https://wiki.php.net/rfc/enumerations
- Fix the parser, the lexer, and `PHP81UnhandledError`
- Add and fix unit tests
  • Loading branch information
junichi11 committed Apr 7, 2022
1 parent a6824d6 commit bdae9ea
Show file tree
Hide file tree
Showing 49 changed files with 50,243 additions and 46,310 deletions.
2,750 changes: 1,390 additions & 1,360 deletions php/php.editor/src/org/netbeans/modules/php/editor/lexer/PHP5ColoringLexer.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
*/
public enum PHPTokenId implements TokenId {

T_INLINE_HTML(null, "php"),
T_INLINE_HTML(null, "php"), // NOI18N
PHP_OPENTAG(null, "phpopenclose"), //NOI18N
T_OPEN_TAG_WITH_ECHO(null, "phpopenclose"),
PHP_CLOSETAG(null, "phpopenclose"), //NOI18N
Expand Down Expand Up @@ -70,6 +70,7 @@ public enum PHPTokenId implements TokenId {
PHP_EMPTY(null, "keyword"), //NOI18N
PHP_CLASS("class", "keyword"), //NOI18N
PHP_TRAIT("trait", "keyword"), //NOI18N
PHP_ENUM("enum", "keyword"), //NOI18N PHP 8.1
PHP_FOR("for", "keyword"), //NOI18N
PHP_STRING(null, "identifier"), //NOI18N
PHP_AS(null, "keyword"), //NOI18N
Expand Down
5,552 changes: 2,851 additions & 2,701 deletions php/php.editor/src/org/netbeans/modules/php/editor/parser/ASTPHP5Parser.java

Large diffs are not rendered by default.

2,606 changes: 1,317 additions & 1,289 deletions php/php.editor/src/org/netbeans/modules/php/editor/parser/ASTPHP5Scanner.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

//----------------------------------------------------
// The following code was generated by CUP v0.11a beta 20060608
// Fri Jan 14 13:12:13 JST 2022
// Sun Mar 27 21:05:05 JST 2022
//----------------------------------------------------

package org.netbeans.modules.php.editor.parser;
Expand Down Expand Up @@ -193,6 +193,7 @@ public interface ASTPHP5Symbols {
public static final int T_DIV_EQUAL = 94;
public static final int T_NUM_STRING = 9;
public static final int T_HALT_COMPILER = 50;
public static final int T_ENUM = 168;
public static final int T_GOTO = 33;
public static final int T_READONLY = 166;
}
Expand Down
6,974 changes: 3,487 additions & 3,487 deletions php/php.editor/src/org/netbeans/modules/php/editor/parser/EncodedActionTable1.java

Large diffs are not rendered by default.

Loading

0 comments on commit bdae9ea

Please sign in to comment.