19 커밋 f2e67fe133 ... 6bbf7797df

작성자 SHA1 메시지 날짜
  mizusato 6bbf7797df update syntax 2 년 전
  mizusato 7197b41702 update syntax 2 년 전
  mizusato ecb1ef9691 update syntax 2 년 전
  mizusato f6a22af331 update syntax 2 년 전
  mizusato 1be3d309b1 update syntax 2 년 전
  mizusato 60e7ea8608 update syntax 2 년 전
  mizusato a8755a85b3 update syntax 2 년 전
  mizusato b2d2e4dac2 update syntax 2 년 전
  mizusato bebad859f8 update syntax 2 년 전
  mizusato f45d7baf59 update syntax 2 년 전
  mizusato e4d604bc80 update syntax 2 년 전
  mizusato 075263e77c update syntax 2 년 전
  mizusato a85deeb07f update syntax 2 년 전
  mizusato 8c1e438791 update syntax 2 년 전
  mizusato 2fffcd01a1 update syntax 2 년 전
  mizusato 672a934115 update syntax 2 년 전
  mizusato b0ac0e8700 update syntax 2 년 전
  mizusato d6a4a0b975 update syntax 2 년 전
  mizusato 7f5da55f21 update syntax 2 년 전
4개의 변경된 파일7025개의 추가작업 그리고 8247개의 파일을 삭제
  1. 39 45
      grammar.js
  2. 288 481
      src/grammar.json
  3. 142 302
      src/node-types.json
  4. 6556 7419
      src/parser.c

+ 39 - 45
grammar.js

@@ -10,8 +10,9 @@ const LF = /[\n]+/
 const Text = /'[^']*'|"[^"]*"/
 const Int = /\-?0[xX][0-9A-Fa-f]+|\-?0[oO][0-7]+|\-?0[bB][01]+|\-?\d+/
 const Float = /\-?\d+(\.\d+)?[Ee][\+\-]?\d+|\-?\d+\.\d+/
+const Byte = /\\x[0-9A-Fa-f][0-9A-Fa-f]/
 const Char = /`.`|\\u[0-9A-Fa-f]+|\\[a-z]/
-const Name = /[^0-9\{\}\[\]\(\)\.,:;\&\|\\'"` \t\r \n][^\{\}\[\]\(\)\.,:;\&\|\\'"` \t\r \n]*/
+const Name = /[^0-9\{\}\[\]\(\)\.,:;@\&\|\\'"` \t\r \n][^\{\}\[\]\(\)\.,:;@\&\|\\'"` \t\r \n]*/
 
 const IgnoreRule = $ => Comment
 const IgnoreTokens = [Blank, LF]
@@ -40,93 +41,86 @@ module.exports = grammar({
         return rules
     })({
         // RULES
-        source_file: $ => repeat($.stmt),
-        stmt: $ => choice($.decl_entry, $.decl_type, $.decl_op, $.decl_method, $.decl_const, $.decl_msg),
+        source_file: $ => seq($.ns, repeat($.stmt)),
+        ns: $ => seq('namespace', optional($.name), '::'),
+        name: $ => Name,
+        stmt: $ => choice($.decl_entry, $.decl_type, $.decl_func, $.decl_const, $.decl_method),
         decl_entry: $ => seq('entry', $.block),
         decl_type: $ => seq(optional($.docs), 'type', $.name, optional($.type_params), optional($.impl), $.type_def),
         type_params: $ => seq('[', optional(seq($.name, repeat(seq(',', $.name)))), ']'),
-        name: $ => Name,
         docs: $ => repeat1($.doc),
         doc: $ => Doc,
         impl: $ => seq('(', optional(seq($.ref_base, repeat(seq(',', $.ref_base)))), ')'),
-        ref_base: $ => seq(optional($.module_prefix), $.name),
-        module_prefix: $ => seq($.name, '::'),
-        type_def: $ => choice('native', $.interface, $.record, $.union),
-        interface: $ => seq(optional('service'), 'interface', '{', optional(seq($.method, repeat(seq(',', $.method)))), '}'),
-        method: $ => seq(optional($.docs), $.name, $.type),
-        record: $ => seq(optional('open'), optional('data'), 'record', $.record_def),
+        ref_base: $ => seq(optional($.ns_prefix), $.name),
+        ns_prefix: $ => seq($.name, '::'),
+        type_def: $ => choice('native', $.record, $.interface, $.union, $.enum),
+        record: $ => seq('record', $.record_def),
         record_def: $ => seq('{', optional(seq($.field, repeat(seq(',', $.field)))), '}'),
         field: $ => seq(optional($.docs), $.name, $.type, optional($.field_default)),
         field_default: $ => seq('default', '(', $.expr, ')'),
-        union: $ => seq(optional('data'), 'union', '{', optional(seq($.union_item, repeat(seq('|', $.union_item)))), '}'),
-        union_item: $ => choice($.union_item_def_const, $.union_item_use_type),
-        union_item_def_const: $ => seq('const', seq($.union_const_def, repeat(seq(',', $.union_const_def)))),
-        union_const_def: $ => seq(optional($.docs), $.name),
-        union_item_use_type: $ => $.type,
-        decl_op: $ => seq(optional($.docs), optional('public'), 'operator', optional(choice('infix', 'variadic')), $.name, $.sig, $.body),
+        interface: $ => seq('interface', '{', optional(seq($.method, repeat(seq(',', $.method)))), '}'),
+        method: $ => seq(optional($.docs), $.name, $.type),
+        union: $ => seq('union', '{', seq($.type, repeat(seq(',', $.type))), '}'),
+        enum: $ => seq('enum', '{', seq($.enum_item, repeat(seq(',', $.enum_item))), '}'),
+        enum_item: $ => seq(optional($.docs), $.name),
+        decl_func: $ => seq(optional($.docs), choice('function', 'operator'), optional('variadic'), $.name, $.sig, $.body),
         sig: $ => seq(optional($.type_params), $.inputs, optional($.implicit), $.output),
         inputs: $ => $.record_def,
         implicit: $ => $.inputs,
         output: $ => $.type,
         body: $ => choice($.native_body, $.block),
         native_body: $ => seq('native', '(', $.text, ')'),
-        decl_method: $ => seq(optional($.docs), optional('public'), 'method', $.receiver, '.', $.name, $.type, $.body),
+        decl_const: $ => seq(optional($.docs), 'const', $.name, $.type, $.body),
+        decl_method: $ => seq(optional($.docs), 'method', $.receiver, '.', $.name, $.type, $.body),
         receiver: $ => $.name,
-        decl_const: $ => seq(optional($.docs), optional('public'), 'const', $.name, $.type, $.body),
-        decl_msg: $ => seq(optional($.docs), optional('public'), 'message', $.msg_lang, $.name, $.inputs, $.msg_expr),
-        msg_lang: $ => $.name,
-        msg_expr: $ => choice($.msg_expr_sp, $.msg_expr_plain),
-        msg_expr_sp: $ => seq($.msg_singular, $.msg_plural),
-        msg_singular: $ => seq('singular', '(', $.string, ')'),
-        msg_plural: $ => seq('plural', '(', $.string, ')'),
-        msg_expr_plain: $ => $.string,
         type: $ => $.ref,
         ref: $ => seq($.ref_base, optional($.type_args)),
         type_args: $ => seq('[', optional(seq($.type, repeat(seq(',', $.type)))), ']'),
         expr: $ => seq(repeat($.cast), $.term, repeat($.pipe)),
         cast: $ => seq('(', '[', $.type, ']', ')'),
-        pipe: $ => choice($.pipe_call, $.pipe_ufcs, $.pipe_cast, $.pipe_get, $.pipe_interior),
+        pipe: $ => choice($.pipe_call, $.pipe_infix, $.pipe_cast, $.pipe_get, $.pipe_interior),
         pipe_call: $ => choice($.call_ordered, $.call_unordered),
         call_ordered: $ => seq('(', optional(seq($.expr, repeat(seq(',', $.expr)))), ')'),
         call_unordered: $ => seq('{', optional(seq($.arg_mapping, repeat(seq(',', $.arg_mapping)))), '}'),
         arg_mapping: $ => seq($.name, optional($.arg_mapping_to)),
         arg_mapping_to: $ => seq(':', $.expr),
-        pipe_ufcs: $ => seq('|', $.ref, $.pipe_call),
+        pipe_infix: $ => seq('|', $.ref, $.pipe_call),
         pipe_cast: $ => seq('.', $.cast),
         pipe_get: $ => seq('.', $.name),
         pipe_interior: $ => seq('.', '(', $.ref_base, ')'),
-        term: $ => choice($.infix, $.lambda, $.if, $.when, $.block, $.ref_term, $.char, $.int, $.float, $.string),
-        infix: $ => seq('(', $.infix_left, $.operator, $.infix_right, ')'),
+        term: $ => choice($.infix_term, $.lambda, $.if, $.when, $.block, $.ref_term, $.int, $.float, $.char, $.bytes, $.string),
+        infix_term: $ => seq('(', $.infix_left, $.operator, $.infix_right, ')'),
         infix_left: $ => $.expr,
         operator: $ => $.ref,
         infix_right: $ => $.expr,
-        lambda: $ => seq('{', '&', optional($.input_names), optional($.rec), '=>', $.expr, '}'),
-        input_names: $ => seq('(', seq($.name, repeat(seq(',', $.name))), ')'),
-        rec: $ => seq('rec', '(', $.name, ')'),
-        if: $ => seq('if', '(', $.cond, ')', $.if_yes, repeat($.elif), 'else', $.if_no),
-        cond: $ => $.expr,
-        if_yes: $ => $.block,
-        if_no: $ => $.block,
-        elif: $ => seq('else', 'if', '(', $.cond, ')', $.block),
-        when: $ => seq('when', '(', seq($.expr, repeat(seq(',', $.expr))), ')', '{', seq($.branch, repeat(seq(',', $.branch))), '}'),
-        branch: $ => seq(seq($.branch_pattern, repeat(seq('|', $.branch_pattern))), optional($.input_names), '=>', $.expr),
-        branch_pattern: $ => choice('else', $.pattern),
+        lambda: $ => seq('{', optional($.pattern), optional($.lambda_self), '=>', $.expr, '}'),
+        lambda_self: $ => seq('&', $.name),
         pattern: $ => choice($.pattern_single, $.pattern_multiple),
         pattern_single: $ => $.name,
         pattern_multiple: $ => seq('(', seq($.name, repeat(seq(',', $.name))), ')'),
+        if: $ => seq('if', '(', seq($.cond, repeat(seq(',', $.cond))), ')', $.if_yes, repeat($.elif), 'else', $.if_no),
+        cond: $ => seq(optional($.cond_pattern), $.expr),
+        cond_pattern: $ => seq('let', $.pattern, '='),
+        if_yes: $ => $.block,
+        if_no: $ => $.block,
+        elif: $ => seq('if', '(', seq($.cond, repeat(seq(',', $.cond))), ')', $.block),
+        when: $ => seq('when', '(', $.expr, ')', '{', seq($.case, repeat(seq(',', $.case))), '}'),
+        case: $ => seq(seq($.name, repeat(seq('|', $.name))), optional($.pattern), '=>', $.expr),
         block: $ => seq('{', repeat($.binding), $.expr, '}'),
         binding: $ => choice($.binding_plain, $.binding_cps),
-        binding_plain: $ => seq('let', $.pattern, ':=', $.expr, ','),
-        binding_cps: $ => seq('\\', $.ref, optional($.cps_binding), $.expr, ','),
-        cps_binding: $ => seq($.pattern, ':='),
+        binding_plain: $ => seq('let', $.pattern, '=', $.expr, ','),
+        binding_cps: $ => seq('@', $.ref, optional($.cps_pattern), $.expr, ','),
+        cps_pattern: $ => seq($.pattern, '='),
         ref_term: $ => seq(optional('new'), $.ref),
-        char: $ => Char,
         int: $ => Int,
         float: $ => Float,
+        char: $ => Char,
+        bytes: $ => repeat1($.byte),
+        byte: $ => Byte,
         string: $ => seq($.text, repeat($.string_part)),
         text: $ => Text,
         string_part: $ => seq('..', $.string_part_content),
-        string_part_content: $ => choice($.text, $.char, $.block),
+        string_part_content: $ => choice($.text, $.char),
     })
 });
 

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 288 - 481
src/grammar.json


+ 142 - 302
src/node-types.json

@@ -61,7 +61,7 @@
       "required": true,
       "types": [
         {
-          "type": "cps_binding",
+          "type": "cps_pattern",
           "named": true
         },
         {
@@ -133,7 +133,7 @@
     }
   },
   {
-    "type": "branch",
+    "type": "bytes",
     "named": true,
     "fields": {},
     "children": {
@@ -141,37 +141,29 @@
       "required": true,
       "types": [
         {
-          "type": "branch_pattern",
-          "named": true
-        },
-        {
-          "type": "expr",
-          "named": true
-        },
-        {
-          "type": "input_names",
+          "type": "byte",
           "named": true
         }
       ]
     }
   },
   {
-    "type": "branch_pattern",
+    "type": "call_ordered",
     "named": true,
     "fields": {},
     "children": {
-      "multiple": false,
+      "multiple": true,
       "required": false,
       "types": [
         {
-          "type": "pattern",
+          "type": "expr",
           "named": true
         }
       ]
     }
   },
   {
-    "type": "call_ordered",
+    "type": "call_unordered",
     "named": true,
     "fields": {},
     "children": {
@@ -179,22 +171,30 @@
       "required": false,
       "types": [
         {
-          "type": "expr",
+          "type": "arg_mapping",
           "named": true
         }
       ]
     }
   },
   {
-    "type": "call_unordered",
+    "type": "case",
     "named": true,
     "fields": {},
     "children": {
       "multiple": true,
-      "required": false,
+      "required": true,
       "types": [
         {
-          "type": "arg_mapping",
+          "type": "expr",
+          "named": true
+        },
+        {
+          "type": "name",
+          "named": true
+        },
+        {
+          "type": "pattern",
           "named": true
         }
       ]
@@ -220,10 +220,14 @@
     "named": true,
     "fields": {},
     "children": {
-      "multiple": false,
+      "multiple": true,
       "required": true,
       "types": [
         {
+          "type": "cond_pattern",
+          "named": true
+        },
+        {
           "type": "expr",
           "named": true
         }
@@ -231,7 +235,22 @@
     }
   },
   {
-    "type": "cps_binding",
+    "type": "cond_pattern",
+    "named": true,
+    "fields": {},
+    "children": {
+      "multiple": false,
+      "required": true,
+      "types": [
+        {
+          "type": "pattern",
+          "named": true
+        }
+      ]
+    }
+  },
+  {
+    "type": "cps_pattern",
     "named": true,
     "fields": {},
     "children": {
@@ -288,7 +307,7 @@
     }
   },
   {
-    "type": "decl_method",
+    "type": "decl_func",
     "named": true,
     "fields": {},
     "children": {
@@ -308,18 +327,14 @@
           "named": true
         },
         {
-          "type": "receiver",
-          "named": true
-        },
-        {
-          "type": "type",
+          "type": "sig",
           "named": true
         }
       ]
     }
   },
   {
-    "type": "decl_msg",
+    "type": "decl_method",
     "named": true,
     "fields": {},
     "children": {
@@ -327,30 +342,30 @@
       "required": true,
       "types": [
         {
-          "type": "docs",
+          "type": "body",
           "named": true
         },
         {
-          "type": "inputs",
+          "type": "docs",
           "named": true
         },
         {
-          "type": "msg_expr",
+          "type": "name",
           "named": true
         },
         {
-          "type": "msg_lang",
+          "type": "receiver",
           "named": true
         },
         {
-          "type": "name",
+          "type": "type",
           "named": true
         }
       ]
     }
   },
   {
-    "type": "decl_op",
+    "type": "decl_type",
     "named": true,
     "fields": {},
     "children": {
@@ -358,11 +373,11 @@
       "required": true,
       "types": [
         {
-          "type": "body",
+          "type": "docs",
           "named": true
         },
         {
-          "type": "docs",
+          "type": "impl",
           "named": true
         },
         {
@@ -370,14 +385,18 @@
           "named": true
         },
         {
-          "type": "sig",
+          "type": "type_def",
+          "named": true
+        },
+        {
+          "type": "type_params",
           "named": true
         }
       ]
     }
   },
   {
-    "type": "decl_type",
+    "type": "docs",
     "named": true,
     "fields": {},
     "children": {
@@ -385,30 +404,33 @@
       "required": true,
       "types": [
         {
-          "type": "docs",
-          "named": true
-        },
-        {
-          "type": "impl",
-          "named": true
-        },
-        {
-          "type": "name",
+          "type": "doc",
           "named": true
-        },
+        }
+      ]
+    }
+  },
+  {
+    "type": "elif",
+    "named": true,
+    "fields": {},
+    "children": {
+      "multiple": true,
+      "required": true,
+      "types": [
         {
-          "type": "type_def",
+          "type": "block",
           "named": true
         },
         {
-          "type": "type_params",
+          "type": "cond",
           "named": true
         }
       ]
     }
   },
   {
-    "type": "docs",
+    "type": "enum",
     "named": true,
     "fields": {},
     "children": {
@@ -416,14 +438,14 @@
       "required": true,
       "types": [
         {
-          "type": "doc",
+          "type": "enum_item",
           "named": true
         }
       ]
     }
   },
   {
-    "type": "elif",
+    "type": "enum_item",
     "named": true,
     "fields": {},
     "children": {
@@ -431,11 +453,11 @@
       "required": true,
       "types": [
         {
-          "type": "block",
+          "type": "docs",
           "named": true
         },
         {
-          "type": "cond",
+          "type": "name",
           "named": true
         }
       ]
@@ -594,29 +616,6 @@
     }
   },
   {
-    "type": "infix",
-    "named": true,
-    "fields": {},
-    "children": {
-      "multiple": true,
-      "required": true,
-      "types": [
-        {
-          "type": "infix_left",
-          "named": true
-        },
-        {
-          "type": "infix_right",
-          "named": true
-        },
-        {
-          "type": "operator",
-          "named": true
-        }
-      ]
-    }
-  },
-  {
     "type": "infix_left",
     "named": true,
     "fields": {},
@@ -647,7 +646,7 @@
     }
   },
   {
-    "type": "input_names",
+    "type": "infix_term",
     "named": true,
     "fields": {},
     "children": {
@@ -655,7 +654,15 @@
       "required": true,
       "types": [
         {
-          "type": "name",
+          "type": "infix_left",
+          "named": true
+        },
+        {
+          "type": "infix_right",
+          "named": true
+        },
+        {
+          "type": "operator",
           "named": true
         }
       ]
@@ -704,41 +711,18 @@
           "named": true
         },
         {
-          "type": "input_names",
+          "type": "lambda_self",
           "named": true
         },
         {
-          "type": "rec",
-          "named": true
-        }
-      ]
-    }
-  },
-  {
-    "type": "method",
-    "named": true,
-    "fields": {},
-    "children": {
-      "multiple": true,
-      "required": true,
-      "types": [
-        {
-          "type": "docs",
-          "named": true
-        },
-        {
-          "type": "name",
-          "named": true
-        },
-        {
-          "type": "type",
+          "type": "pattern",
           "named": true
         }
       ]
     }
   },
   {
-    "type": "module_prefix",
+    "type": "lambda_self",
     "named": true,
     "fields": {},
     "children": {
@@ -753,41 +737,7 @@
     }
   },
   {
-    "type": "msg_expr",
-    "named": true,
-    "fields": {},
-    "children": {
-      "multiple": false,
-      "required": true,
-      "types": [
-        {
-          "type": "msg_expr_plain",
-          "named": true
-        },
-        {
-          "type": "msg_expr_sp",
-          "named": true
-        }
-      ]
-    }
-  },
-  {
-    "type": "msg_expr_plain",
-    "named": true,
-    "fields": {},
-    "children": {
-      "multiple": false,
-      "required": true,
-      "types": [
-        {
-          "type": "string",
-          "named": true
-        }
-      ]
-    }
-  },
-  {
-    "type": "msg_expr_sp",
+    "type": "method",
     "named": true,
     "fields": {},
     "children": {
@@ -795,33 +745,22 @@
       "required": true,
       "types": [
         {
-          "type": "msg_plural",
+          "type": "docs",
           "named": true
         },
         {
-          "type": "msg_singular",
+          "type": "name",
           "named": true
-        }
-      ]
-    }
-  },
-  {
-    "type": "msg_lang",
-    "named": true,
-    "fields": {},
-    "children": {
-      "multiple": false,
-      "required": true,
-      "types": [
+        },
         {
-          "type": "name",
+          "type": "type",
           "named": true
         }
       ]
     }
   },
   {
-    "type": "msg_plural",
+    "type": "native_body",
     "named": true,
     "fields": {},
     "children": {
@@ -829,29 +768,29 @@
       "required": true,
       "types": [
         {
-          "type": "string",
+          "type": "text",
           "named": true
         }
       ]
     }
   },
   {
-    "type": "msg_singular",
+    "type": "ns",
     "named": true,
     "fields": {},
     "children": {
       "multiple": false,
-      "required": true,
+      "required": false,
       "types": [
         {
-          "type": "string",
+          "type": "name",
           "named": true
         }
       ]
     }
   },
   {
-    "type": "native_body",
+    "type": "ns_prefix",
     "named": true,
     "fields": {},
     "children": {
@@ -859,7 +798,7 @@
       "required": true,
       "types": [
         {
-          "type": "text",
+          "type": "name",
           "named": true
         }
       ]
@@ -965,11 +904,11 @@
           "named": true
         },
         {
-          "type": "pipe_interior",
+          "type": "pipe_infix",
           "named": true
         },
         {
-          "type": "pipe_ufcs",
+          "type": "pipe_interior",
           "named": true
         }
       ]
@@ -1025,22 +964,7 @@
     }
   },
   {
-    "type": "pipe_interior",
-    "named": true,
-    "fields": {},
-    "children": {
-      "multiple": false,
-      "required": true,
-      "types": [
-        {
-          "type": "ref_base",
-          "named": true
-        }
-      ]
-    }
-  },
-  {
-    "type": "pipe_ufcs",
+    "type": "pipe_infix",
     "named": true,
     "fields": {},
     "children": {
@@ -1059,7 +983,7 @@
     }
   },
   {
-    "type": "rec",
+    "type": "pipe_interior",
     "named": true,
     "fields": {},
     "children": {
@@ -1067,7 +991,7 @@
       "required": true,
       "types": [
         {
-          "type": "name",
+          "type": "ref_base",
           "named": true
         }
       ]
@@ -1146,11 +1070,11 @@
       "required": true,
       "types": [
         {
-          "type": "module_prefix",
+          "type": "name",
           "named": true
         },
         {
-          "type": "name",
+          "type": "ns_prefix",
           "named": true
         }
       ]
@@ -1204,9 +1128,13 @@
     "fields": {},
     "children": {
       "multiple": true,
-      "required": false,
+      "required": true,
       "types": [
         {
+          "type": "ns",
+          "named": true
+        },
+        {
           "type": "stmt",
           "named": true
         }
@@ -1230,15 +1158,11 @@
           "named": true
         },
         {
-          "type": "decl_method",
-          "named": true
-        },
-        {
-          "type": "decl_msg",
+          "type": "decl_func",
           "named": true
         },
         {
-          "type": "decl_op",
+          "type": "decl_method",
           "named": true
         },
         {
@@ -1291,10 +1215,6 @@
       "required": true,
       "types": [
         {
-          "type": "block",
-          "named": true
-        },
-        {
           "type": "char",
           "named": true
         },
@@ -1318,6 +1238,10 @@
           "named": true
         },
         {
+          "type": "bytes",
+          "named": true
+        },
+        {
           "type": "char",
           "named": true
         },
@@ -1330,7 +1254,7 @@
           "named": true
         },
         {
-          "type": "infix",
+          "type": "infix_term",
           "named": true
         },
         {
@@ -1395,6 +1319,10 @@
       "required": false,
       "types": [
         {
+          "type": "enum",
+          "named": true
+        },
+        {
           "type": "interface",
           "named": true
         },
@@ -1430,74 +1358,6 @@
     "fields": {},
     "children": {
       "multiple": true,
-      "required": false,
-      "types": [
-        {
-          "type": "union_item",
-          "named": true
-        }
-      ]
-    }
-  },
-  {
-    "type": "union_const_def",
-    "named": true,
-    "fields": {},
-    "children": {
-      "multiple": true,
-      "required": true,
-      "types": [
-        {
-          "type": "docs",
-          "named": true
-        },
-        {
-          "type": "name",
-          "named": true
-        }
-      ]
-    }
-  },
-  {
-    "type": "union_item",
-    "named": true,
-    "fields": {},
-    "children": {
-      "multiple": false,
-      "required": true,
-      "types": [
-        {
-          "type": "union_item_def_const",
-          "named": true
-        },
-        {
-          "type": "union_item_use_type",
-          "named": true
-        }
-      ]
-    }
-  },
-  {
-    "type": "union_item_def_const",
-    "named": true,
-    "fields": {},
-    "children": {
-      "multiple": true,
-      "required": true,
-      "types": [
-        {
-          "type": "union_const_def",
-          "named": true
-        }
-      ]
-    }
-  },
-  {
-    "type": "union_item_use_type",
-    "named": true,
-    "fields": {},
-    "children": {
-      "multiple": false,
       "required": true,
       "types": [
         {
@@ -1516,7 +1376,7 @@
       "required": true,
       "types": [
         {
-          "type": "branch",
+          "type": "case",
           "named": true
         },
         {
@@ -1559,7 +1419,7 @@
     "named": false
   },
   {
-    "type": ":=",
+    "type": "=",
     "named": false
   },
   {
@@ -1567,11 +1427,11 @@
     "named": false
   },
   {
-    "type": "[",
+    "type": "@",
     "named": false
   },
   {
-    "type": "\\",
+    "type": "[",
     "named": false
   },
   {
@@ -1579,15 +1439,15 @@
     "named": false
   },
   {
-    "type": "char",
+    "type": "byte",
     "named": true
   },
   {
-    "type": "const",
-    "named": false
+    "type": "char",
+    "named": true
   },
   {
-    "type": "data",
+    "type": "const",
     "named": false
   },
   {
@@ -1607,15 +1467,19 @@
     "named": false
   },
   {
+    "type": "enum",
+    "named": false
+  },
+  {
     "type": "float",
     "named": true
   },
   {
-    "type": "if",
+    "type": "function",
     "named": false
   },
   {
-    "type": "infix",
+    "type": "if",
     "named": false
   },
   {
@@ -1631,10 +1495,6 @@
     "named": false
   },
   {
-    "type": "message",
-    "named": false
-  },
-  {
     "type": "method",
     "named": false
   },
@@ -1643,15 +1503,15 @@
     "named": true
   },
   {
-    "type": "native",
+    "type": "namespace",
     "named": false
   },
   {
-    "type": "new",
+    "type": "native",
     "named": false
   },
   {
-    "type": "open",
+    "type": "new",
     "named": false
   },
   {
@@ -1659,30 +1519,10 @@
     "named": false
   },
   {
-    "type": "plural",
-    "named": false
-  },
-  {
-    "type": "public",
-    "named": false
-  },
-  {
-    "type": "rec",
-    "named": false
-  },
-  {
     "type": "record",
     "named": false
   },
   {
-    "type": "service",
-    "named": false
-  },
-  {
-    "type": "singular",
-    "named": false
-  },
-  {
     "type": "text",
     "named": true
   },

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 6556 - 7419
src/parser.c