From 062783a0b29f4ad7046a749a3285b5325293f6a3 Mon Sep 17 00:00:00 2001 From: Alexandr Baranezky Date: Sat, 23 Dec 2017 20:02:42 +0200 Subject: [PATCH 1/4] Fixed method modifiers composition syntax recognition --- README.md | 9 ++++++--- src/com/zephir/Zephir.bnf | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d465c8e..785ccde 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,12 @@ Plugin page: http://plugins.jetbrains.com/plugin/7558 1. Install next plugins for Intellij * https://plugins.jetbrains.com/plugin/6606-grammar-kit -2. Go to `Zephir.bnf` file and run "Generate parser code" through context menu -3. Go to `src/com/zephir/Zephir.flex` and run "Run JFlex generator" through context menu -4. Run the plugin by Menu -> Run -> Run +2. Go to `Zephir.bnf` file and run "Generate parser code" through context menu +3. Go to `src/com/zephir/lexer/Zephir.flex` and run "Run JFlex generator" through context menu + And specify idea-plugin/lib/ directory to get "lib/jflex-*.jar" file +4. Specify */gen* folder as *source code folder* Menu -> File -> Project Structure... + In *Modules* tab specify */gen* folder as "Source" +5. Run the plugin by Menu -> Run -> Run ## Links diff --git a/src/com/zephir/Zephir.bnf b/src/com/zephir/Zephir.bnf index 4f1904e..c557885 100644 --- a/src/com/zephir/Zephir.bnf +++ b/src/com/zephir/Zephir.bnf @@ -194,7 +194,7 @@ method_definition ::= method_header '(' arguments* ')' return_type? method_body method_modifiers ::= 'static' | 'inline' | 'deprecated' | 'final' method_body ::= code_block -private method_header ::= (visibility method_modifiers* | method_modifiers* visibility ) FUNCTION id +private method_header ::= (visibility | method_modifiers)* FUNCTION id code_block ::= '{' code* '}' {pin=1} return_type ::= '->' (type | 'null') ('|' (type | 'null'))* {pin(".*")=1} From 77ce0c553dd0845c0f2a1bab9ad479ebe6ec6e8f Mon Sep 17 00:00:00 2001 From: Alexandr Baranezky Date: Sat, 23 Dec 2017 22:37:49 +0200 Subject: [PATCH 2/4] Improved syntax support --- src/com/zephir/Zephir.bnf | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/com/zephir/Zephir.bnf b/src/com/zephir/Zephir.bnf index c557885..6e40141 100644 --- a/src/com/zephir/Zephir.bnf +++ b/src/com/zephir/Zephir.bnf @@ -224,6 +224,7 @@ private void_type ::= 'void' code ::= declaration_statement | let_statement | call_statement | + chain_of_call_statement | control_statement | loop_statement | switch_statement | @@ -295,9 +296,12 @@ expr ::= unary_expr | special_group_expr private bool_group_expr ::= bool_expr | ternary_expr | empty_expr | isset_expr | fetch_expr | instanceof_expr -private primary_group_expr ::= static_call_expr | literal_expr | paren_expr | precast_expr | callback_expr | call_expr | clone_expr +private primary_group_expr ::= chain_of_call_expr | static_call_expr | literal_expr | paren_expr | precast_expr | callback_expr | call_expr | clone_expr private special_group_expr ::= new_expr | typeof_expr +chain_of_call_statement ::= chain_of_call_expr ; +chain_of_call_expr ::= (paren_expr '->') expr + bit_expr ::= expr bit_operator expr bit_operator ::= '&' | '|' | '^' | '>>' | '<<' From aaca5af71553ac520ccd311b86e1bad0590a49d9 Mon Sep 17 00:00:00 2001 From: Alexandr Baranezky Date: Sun, 24 Dec 2017 00:02:53 +0200 Subject: [PATCH 3/4] Added description into plugin.xml --- resources/META-INF/plugin.xml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/resources/META-INF/plugin.xml b/resources/META-INF/plugin.xml index 1a69504..0e1a763 100644 --- a/resources/META-INF/plugin.xml +++ b/resources/META-INF/plugin.xml @@ -1,7 +1,7 @@ com.zephir Zephir - 0.3.2-beta3 + 0.3.2 Zephir Team 0.3.2 Improved syntax support
  • 0.3.2-beta3 Fixed regex recognition bug. Added syntax support for constructions like {var}
  • 0.3.2-beta2: Improved syntax support. Fixed completion bug when invoking AC in method definition block
  • 0.3.2-beta1: Introduced class members in completion list
  • 0.3.1: Fixed much bugs with syntax recognition, fixed extra space in completion for method params
  • -
  • 0.3.0: Fixed many bugs with syntax recognition, added few words to highlight, improved completion
  • -
  • 0.2.5: Fixed "switch" keyword detection
  • -
  • 0.2.4: Added brace matching
  • -
  • 0.2.3: Fixed build
  • -
  • 0.2.2: Improve highlighter, added color settings page
  • -
  • 0.2.1: Disabled "New Zephir class" dialog
  • -
  • 0.2.0: Added lexer and simple syntax highlighter
  • -
  • 0.1.0: Initial plugin
  • ]]>
    From adfb19a033f29207c6618010f81038cb5c953b56 Mon Sep 17 00:00:00 2001 From: Alexandr Baranezky Date: Wed, 27 Dec 2017 21:45:14 +0200 Subject: [PATCH 4/4] Improved change log --- resources/META-INF/plugin.xml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/resources/META-INF/plugin.xml b/resources/META-INF/plugin.xml index 0e1a763..3222e19 100644 --- a/resources/META-INF/plugin.xml +++ b/resources/META-INF/plugin.xml @@ -12,11 +12,16 @@ ]]> 0.3.2 Improved syntax support -
  • 0.3.2-beta3 Fixed regex recognition bug. Added syntax support for constructions like {var}
  • -
  • 0.3.2-beta2: Improved syntax support. Fixed completion bug when invoking AC in method definition block
  • -
  • 0.3.2-beta1: Introduced class members in completion list
  • +
  • 0.3.2: Completion list now shows members of class. Improved syntax support
  • 0.3.1: Fixed much bugs with syntax recognition, fixed extra space in completion for method params
  • +
  • 0.3.0: Fixed many bugs with syntax recognition, added few words to highlight, improved completion
  • +
  • 0.2.5: Fixed "switch" keyword detection
  • +
  • 0.2.4: Added brace matching
  • +
  • 0.2.3: Fixed build
  • +
  • 0.2.2: Improve highlighter, added color settings page
  • +
  • 0.2.1: Disabled "New Zephir class" dialog
  • +
  • 0.2.0: Added lexer and simple syntax highlighter
  • +
  • 0.1.0: Initial plugin
  • ]]>