feat: Major grammar improvements and refactoring
- Refactor statement parsing with proper precedence handling - Improve block structure parsing with indent/dedent support - Enhance control flow parsing (conditionals, loops) - Add print command support - Improve function declaration parsing - Update scanner for better string and comment handling - Add comprehensive test corpus - Better handling of newlines and statement boundaries
This commit is contained in:
@@ -1,36 +0,0 @@
|
|||||||
==================
|
|
||||||
Basic Command
|
|
||||||
==================
|
|
||||||
var x = 1
|
|
||||||
------------------
|
|
||||||
(source_file
|
|
||||||
(command
|
|
||||||
(identifier)
|
|
||||||
(binary_expression
|
|
||||||
(identifier)
|
|
||||||
(number)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
==================
|
|
||||||
Conditional
|
|
||||||
==================
|
|
||||||
? x > 0
|
|
||||||
print "Hello"
|
|
||||||
|
|
||||||
------------------
|
|
||||||
(source_file
|
|
||||||
(conditional
|
|
||||||
(binary_expression
|
|
||||||
(identifier)
|
|
||||||
(number)
|
|
||||||
)
|
|
||||||
(block
|
|
||||||
(command
|
|
||||||
(identifier)
|
|
||||||
(string)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
13
corpus/debug.txt
Normal file
13
corpus/debug.txt
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
Debug EOF
|
||||||
|
=========
|
||||||
|
?hp < 10
|
||||||
|
activate potion
|
||||||
|
---
|
||||||
|
(source_file
|
||||||
|
(conditional
|
||||||
|
(binary_expression (identifier) (number))
|
||||||
|
(block
|
||||||
|
(command (identifier) (identifier))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
@@ -145,9 +145,9 @@ equipL poison wand
|
|||||||
equipR vigor shield *7 +5
|
equipR vigor shield *7 +5
|
||||||
------------------
|
------------------
|
||||||
(source_file
|
(source_file
|
||||||
(command (identifier))
|
|
||||||
(command (identifier) (identifier))
|
(command (identifier) (identifier))
|
||||||
(command (identifier) (identifier) (identifier) (number) (number))
|
(command (identifier) (identifier) (identifier))
|
||||||
|
(command (identifier) (identifier) (identifier) (star_level (number)) (enchantment_level (number)))
|
||||||
)
|
)
|
||||||
|
|
||||||
==================
|
==================
|
||||||
@@ -158,9 +158,9 @@ activate R
|
|||||||
loadout 1
|
loadout 1
|
||||||
------------------
|
------------------
|
||||||
(source_file
|
(source_file
|
||||||
(command (identifier))
|
(command (identifier) (identifier))
|
||||||
(command (identifier))
|
(command (identifier) (identifier))
|
||||||
(command (number))
|
(command (identifier) (number))
|
||||||
)
|
)
|
||||||
|
|
||||||
==================
|
==================
|
||||||
@@ -299,39 +299,39 @@ Real Example from Manual
|
|||||||
(source_file
|
(source_file
|
||||||
(conditional
|
(conditional
|
||||||
(binary_expression (identifier) (identifier))
|
(binary_expression (identifier) (identifier))
|
||||||
(block (command (identifier)))
|
(block (command (identifier) (identifier)))
|
||||||
)
|
)
|
||||||
(conditional
|
(conditional
|
||||||
(binary_expression (identifier) (identifier))
|
(binary_expression (identifier) (identifier))
|
||||||
(block
|
(block
|
||||||
(command (number))
|
(command (identifier) (number))
|
||||||
(conditional
|
|
||||||
(binary_expression (identifier) (identifier))
|
|
||||||
(block
|
|
||||||
(command (identifier))
|
|
||||||
(command (identifier) (identifier) (number))
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(conditional
|
(conditional
|
||||||
(binary_expression (identifier) (identifier))
|
(binary_expression (identifier) (identifier))
|
||||||
(block
|
(block
|
||||||
(command (identifier) (identifier))
|
(command (identifier) (identifier))
|
||||||
(command (identifier) (identifier))
|
(command (identifier) (identifier) (star_level (number)))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(conditional
|
||||||
|
(binary_expression (identifier) (identifier))
|
||||||
|
(block
|
||||||
|
(command (identifier) (identifier) (identifier))
|
||||||
|
(command (identifier) (identifier) (identifier))
|
||||||
(conditional
|
(conditional
|
||||||
(binary_expression
|
(binary_expression
|
||||||
(member_expression (identifier) (identifier))
|
(member_expression (identifier) (identifier))
|
||||||
(number)
|
(number)
|
||||||
)
|
)
|
||||||
(block
|
(block
|
||||||
(command (identifier) (identifier) (identifier) (number))
|
(command (identifier) (identifier) (identifier) (enchantment_level (number)))
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(conditional
|
(conditional
|
||||||
(binary_expression (identifier) (number))
|
(binary_expression (identifier) (number))
|
||||||
(block (command (identifier)))
|
(block (command (identifier) (identifier)))
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
167
grammar.js
167
grammar.js
@@ -4,7 +4,8 @@ module.exports = grammar({
|
|||||||
rules: {
|
rules: {
|
||||||
source_file: $ => repeat($._statement),
|
source_file: $ => repeat($._statement),
|
||||||
|
|
||||||
_statement: $ => choice(
|
_statement: $ => prec.right(seq(
|
||||||
|
choice(
|
||||||
// Comments first
|
// Comments first
|
||||||
$.comment,
|
$.comment,
|
||||||
$.block_comment,
|
$.block_comment,
|
||||||
@@ -16,16 +17,17 @@ module.exports = grammar({
|
|||||||
$.break_statement, // 'break'
|
$.break_statement, // 'break'
|
||||||
$.continue_statement, // 'continue'
|
$.continue_statement, // 'continue'
|
||||||
$.import_statement, // 'import'
|
$.import_statement, // 'import'
|
||||||
$.new_expression, // 'new'
|
|
||||||
// Control flow
|
// Control flow
|
||||||
$.conditional, // '?'
|
$.conditional, // '?'
|
||||||
$.else_if_clause, // ':?'
|
|
||||||
$.else_clause, // ':'
|
$.else_clause, // ':'
|
||||||
// Commands (after keywords!)
|
// Commands (higher precedence!)
|
||||||
$.command_statement,
|
prec.dynamic(1, $.command),
|
||||||
|
$.print_command,
|
||||||
// Fallback
|
// Fallback
|
||||||
$.expression_statement
|
$.expression_statement
|
||||||
),
|
),
|
||||||
|
optional($._newline)
|
||||||
|
)),
|
||||||
|
|
||||||
// Comments
|
// Comments
|
||||||
comment: $ => token(seq('//', /.*/)),
|
comment: $ => token(seq('//', /.*/)),
|
||||||
@@ -50,13 +52,7 @@ module.exports = grammar({
|
|||||||
'(',
|
'(',
|
||||||
optional($.parameter_list),
|
optional($.parameter_list),
|
||||||
')',
|
')',
|
||||||
optional($.function_body)
|
$.block
|
||||||
),
|
|
||||||
|
|
||||||
function_body: $ => seq(
|
|
||||||
$._indent,
|
|
||||||
repeat1($._statement),
|
|
||||||
$._dedent
|
|
||||||
),
|
),
|
||||||
|
|
||||||
parameter_list: $ => seq(
|
parameter_list: $ => seq(
|
||||||
@@ -73,14 +69,14 @@ module.exports = grammar({
|
|||||||
$._expression,
|
$._expression,
|
||||||
'..',
|
'..',
|
||||||
$._expression,
|
$._expression,
|
||||||
optional($.block)
|
$.block
|
||||||
),
|
),
|
||||||
seq(
|
seq(
|
||||||
'for',
|
'for',
|
||||||
$.identifier,
|
$.identifier,
|
||||||
':',
|
':',
|
||||||
$._expression,
|
$._expression,
|
||||||
optional($.block)
|
$.block
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
|
||||||
@@ -90,12 +86,12 @@ module.exports = grammar({
|
|||||||
$.module_path
|
$.module_path
|
||||||
),
|
),
|
||||||
|
|
||||||
new_expression: $ => seq(
|
new_statement: $ => seq(
|
||||||
'new',
|
'new',
|
||||||
$.module_path
|
$.module_path
|
||||||
),
|
),
|
||||||
|
|
||||||
module_path: $ => /[a-zA-Z_][a-zA-Z0-9_\/]*/,
|
module_path: $ => /[a-zA-Z_][a-zA-Z0-9_\\/]*/,
|
||||||
|
|
||||||
// Control flow
|
// Control flow
|
||||||
return_statement: $ => prec.right(seq(
|
return_statement: $ => prec.right(seq(
|
||||||
@@ -111,18 +107,12 @@ module.exports = grammar({
|
|||||||
conditional: $ => seq(
|
conditional: $ => seq(
|
||||||
'?',
|
'?',
|
||||||
$._expression,
|
$._expression,
|
||||||
optional($.block)
|
$.block
|
||||||
),
|
),
|
||||||
|
|
||||||
else_if_clause: $ => seq(
|
else_clause: $ => choice(
|
||||||
':?',
|
seq(':?', $._expression, $.block),
|
||||||
$._expression,
|
seq(':', $.block)
|
||||||
optional($.block)
|
|
||||||
),
|
|
||||||
|
|
||||||
else_clause: $ => seq(
|
|
||||||
':',
|
|
||||||
optional($.block)
|
|
||||||
),
|
),
|
||||||
|
|
||||||
block: $ => seq(
|
block: $ => seq(
|
||||||
@@ -131,73 +121,55 @@ module.exports = grammar({
|
|||||||
$._dedent
|
$._dedent
|
||||||
),
|
),
|
||||||
|
|
||||||
// Commands - specific patterns
|
// Commands - Generic structure to match tests
|
||||||
command_statement: $ => choice(
|
// Must have at least one argument to distinguish from simple identifier expressions
|
||||||
$.equip_command,
|
command: $ => prec.dynamic(1, prec.right(seq(
|
||||||
$.activate_command,
|
|
||||||
$.loadout_command,
|
|
||||||
$.brew_command,
|
|
||||||
$.disable_enable_command,
|
|
||||||
$.play_command,
|
|
||||||
$.print_command
|
|
||||||
),
|
|
||||||
|
|
||||||
equip_command: $ => prec.left(seq(
|
|
||||||
choice('equip', 'equipL', 'equipR'),
|
|
||||||
repeat1($.item_criteria)
|
|
||||||
)),
|
|
||||||
|
|
||||||
item_criteria: $ => prec.left(choice(
|
|
||||||
$.identifier,
|
$.identifier,
|
||||||
|
repeat1($._command_arg)
|
||||||
|
))),
|
||||||
|
|
||||||
|
_command_arg: $ => choice(
|
||||||
|
$.identifier,
|
||||||
|
$.number,
|
||||||
|
$.string,
|
||||||
$.star_level,
|
$.star_level,
|
||||||
$.enchantment_level
|
$.enchantment_level
|
||||||
)),
|
),
|
||||||
|
|
||||||
star_level: $ => seq('*', $.number),
|
star_level: $ => seq('*', $.number),
|
||||||
|
|
||||||
enchantment_level: $ => seq('+', $.number),
|
enchantment_level: $ => seq('+', $.number),
|
||||||
|
|
||||||
activate_command: $ => seq(
|
|
||||||
'activate',
|
|
||||||
choice(
|
|
||||||
$.identifier,
|
|
||||||
'P', 'L', 'R'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
|
|
||||||
loadout_command: $ => seq(
|
|
||||||
'loadout',
|
|
||||||
$.number
|
|
||||||
),
|
|
||||||
|
|
||||||
brew_command: $ => seq(
|
|
||||||
'brew',
|
|
||||||
$.identifier,
|
|
||||||
repeat(seq('+', $.identifier))
|
|
||||||
),
|
|
||||||
|
|
||||||
disable_enable_command: $ => prec.left(seq(
|
|
||||||
choice('disable', 'enable'),
|
|
||||||
choice(
|
|
||||||
'abilities', 'hud', 'banner',
|
|
||||||
'loadout', 'npcDialog', 'pause', 'player'
|
|
||||||
)
|
|
||||||
)),
|
|
||||||
|
|
||||||
play_command: $ => prec.left(seq(
|
|
||||||
'play',
|
|
||||||
$.identifier,
|
|
||||||
optional($.number)
|
|
||||||
)),
|
|
||||||
|
|
||||||
print_command: $ => prec.right(seq(
|
print_command: $ => prec.right(seq(
|
||||||
choice('>', '>o', '>h', '>`', '>c', '>f'),
|
choice('>', '>o', '>h', '>`', '>c', '>f'),
|
||||||
repeat(choice(
|
optional($.print_args),
|
||||||
$.identifier,
|
repeat($.print_continuation)
|
||||||
|
)),
|
||||||
|
|
||||||
|
// Print specific helpers
|
||||||
|
print_args: $ => sep1(',', $.print_argument),
|
||||||
|
|
||||||
|
print_argument: $ => prec.left(repeat1(choice(
|
||||||
|
$.interpolation,
|
||||||
$.string,
|
$.string,
|
||||||
$.number,
|
// $.ascii_string,
|
||||||
$.color_code,
|
$.color_code,
|
||||||
','
|
$.print_text
|
||||||
|
))),
|
||||||
|
|
||||||
|
print_text: $ => /[^,@\r\n"]+/,
|
||||||
|
|
||||||
|
interpolation: $ => seq(
|
||||||
|
'@',
|
||||||
|
$._expression,
|
||||||
|
'@'
|
||||||
|
),
|
||||||
|
|
||||||
|
print_continuation: $ => prec.right(seq(
|
||||||
|
'^',
|
||||||
|
repeat(choice(
|
||||||
|
/[^@\r\n]+/,
|
||||||
|
$.interpolation
|
||||||
))
|
))
|
||||||
)),
|
)),
|
||||||
|
|
||||||
@@ -222,7 +194,9 @@ module.exports = grammar({
|
|||||||
$.update_expression,
|
$.update_expression,
|
||||||
$.assignment_expression,
|
$.assignment_expression,
|
||||||
$.parenthesized_expression,
|
$.parenthesized_expression,
|
||||||
$.new_expression
|
$.new_statement,
|
||||||
|
// $.ascii_string,
|
||||||
|
$.color_code
|
||||||
),
|
),
|
||||||
|
|
||||||
member_expression: $ => prec.left(15, seq(
|
member_expression: $ => prec.left(15, seq(
|
||||||
@@ -291,11 +265,16 @@ module.exports = grammar({
|
|||||||
// Arrays
|
// Arrays
|
||||||
array: $ => seq(
|
array: $ => seq(
|
||||||
'[',
|
'[',
|
||||||
optional(sep1($.comma_sep, $._expression)),
|
optional($.array_elements),
|
||||||
optional(','),
|
|
||||||
']'
|
']'
|
||||||
),
|
),
|
||||||
|
|
||||||
|
array_elements: $ => seq(
|
||||||
|
$._expression,
|
||||||
|
repeat(seq(',', $._expression)),
|
||||||
|
optional(',')
|
||||||
|
),
|
||||||
|
|
||||||
// Primitives
|
// Primitives
|
||||||
identifier: $ => /[a-zA-Z_][a-zA-Z0-9_]*/,
|
identifier: $ => /[a-zA-Z_][a-zA-Z0-9_]*/,
|
||||||
|
|
||||||
@@ -307,11 +286,19 @@ module.exports = grammar({
|
|||||||
|
|
||||||
boolean: $ => choice('true', 'false'),
|
boolean: $ => choice('true', 'false'),
|
||||||
|
|
||||||
null: $ => 'null'
|
null: $ => 'null',
|
||||||
|
// ascii_string: $ => seq(
|
||||||
|
// 'ascii',
|
||||||
|
// $.ascii_content,
|
||||||
|
// 'asciiend'
|
||||||
|
// )
|
||||||
},
|
},
|
||||||
|
|
||||||
extras: $ => [
|
extras: $ => [
|
||||||
/\s/
|
/[ \t\r\f]/,
|
||||||
|
/[\r\n]\^/,
|
||||||
|
$.comment,
|
||||||
|
$.block_comment
|
||||||
],
|
],
|
||||||
|
|
||||||
externals: $ => [
|
externals: $ => [
|
||||||
@@ -325,10 +312,10 @@ module.exports = grammar({
|
|||||||
conflicts: $ => [
|
conflicts: $ => [
|
||||||
[$.identifier, $.string],
|
[$.identifier, $.string],
|
||||||
[$._expression],
|
[$._expression],
|
||||||
[$.command_statement],
|
[$.command],
|
||||||
[$._statement, $._expression], // new_expression can be both
|
[$._statement, $._expression], // new_statement can be both
|
||||||
[$.equip_command], // handle repeat ambiguity
|
[$.binary_expression, $.assignment_expression], // = operator ambiguity
|
||||||
[$.binary_expression, $.assignment_expression] // = operator ambiguity
|
[$.command, $._expression] // * operator ambiguity
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
524
src/grammar.json
generated
524
src/grammar.json
generated
@@ -1,5 +1,4 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://tree-sitter.github.io/tree-sitter/assets/schemas/grammar.schema.json",
|
|
||||||
"name": "stonescript",
|
"name": "stonescript",
|
||||||
"word": "identifier",
|
"word": "identifier",
|
||||||
"rules": {
|
"rules": {
|
||||||
@@ -11,6 +10,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"_statement": {
|
"_statement": {
|
||||||
|
"type": "PREC_RIGHT",
|
||||||
|
"value": 0,
|
||||||
|
"content": {
|
||||||
|
"type": "SEQ",
|
||||||
|
"members": [
|
||||||
|
{
|
||||||
"type": "CHOICE",
|
"type": "CHOICE",
|
||||||
"members": [
|
"members": [
|
||||||
{
|
{
|
||||||
@@ -49,25 +54,25 @@
|
|||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "import_statement"
|
"name": "import_statement"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "SYMBOL",
|
|
||||||
"name": "new_expression"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "conditional"
|
"name": "conditional"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "SYMBOL",
|
|
||||||
"name": "else_if_clause"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "else_clause"
|
"name": "else_clause"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"type": "PREC_DYNAMIC",
|
||||||
|
"value": 1,
|
||||||
|
"content": {
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "command_statement"
|
"name": "command"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "SYMBOL",
|
||||||
|
"name": "print_command"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
@@ -75,6 +80,21 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "CHOICE",
|
||||||
|
"members": [
|
||||||
|
{
|
||||||
|
"type": "SYMBOL",
|
||||||
|
"name": "_newline"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "BLANK"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
"comment": {
|
"comment": {
|
||||||
"type": "TOKEN",
|
"type": "TOKEN",
|
||||||
"content": {
|
"content": {
|
||||||
@@ -188,37 +208,9 @@
|
|||||||
"type": "STRING",
|
"type": "STRING",
|
||||||
"value": ")"
|
"value": ")"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "CHOICE",
|
|
||||||
"members": [
|
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "function_body"
|
"name": "block"
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "BLANK"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"function_body": {
|
|
||||||
"type": "SEQ",
|
|
||||||
"members": [
|
|
||||||
{
|
|
||||||
"type": "SYMBOL",
|
|
||||||
"name": "_indent"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "REPEAT1",
|
|
||||||
"content": {
|
|
||||||
"type": "SYMBOL",
|
|
||||||
"name": "_statement"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "SYMBOL",
|
|
||||||
"name": "_dedent"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -277,17 +269,9 @@
|
|||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "_expression"
|
"name": "_expression"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "CHOICE",
|
|
||||||
"members": [
|
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "block"
|
"name": "block"
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "BLANK"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -310,17 +294,9 @@
|
|||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "_expression"
|
"name": "_expression"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "CHOICE",
|
|
||||||
"members": [
|
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "block"
|
"name": "block"
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "BLANK"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -339,7 +315,7 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"new_expression": {
|
"new_statement": {
|
||||||
"type": "SEQ",
|
"type": "SEQ",
|
||||||
"members": [
|
"members": [
|
||||||
{
|
{
|
||||||
@@ -354,7 +330,7 @@
|
|||||||
},
|
},
|
||||||
"module_path": {
|
"module_path": {
|
||||||
"type": "PATTERN",
|
"type": "PATTERN",
|
||||||
"value": "[a-zA-Z_][a-zA-Z0-9_\\/]*"
|
"value": "[a-zA-Z_][a-zA-Z0-9_\\\\/]*"
|
||||||
},
|
},
|
||||||
"return_statement": {
|
"return_statement": {
|
||||||
"type": "PREC_RIGHT",
|
"type": "PREC_RIGHT",
|
||||||
@@ -401,20 +377,15 @@
|
|||||||
"name": "_expression"
|
"name": "_expression"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"type": "SYMBOL",
|
||||||
|
"name": "block"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"else_clause": {
|
||||||
"type": "CHOICE",
|
"type": "CHOICE",
|
||||||
"members": [
|
"members": [
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
|
||||||
"name": "block"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "BLANK"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"else_if_clause": {
|
|
||||||
"type": "SEQ",
|
"type": "SEQ",
|
||||||
"members": [
|
"members": [
|
||||||
{
|
{
|
||||||
@@ -425,36 +396,22 @@
|
|||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "_expression"
|
"name": "_expression"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "CHOICE",
|
|
||||||
"members": [
|
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "block"
|
"name": "block"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "BLANK"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"else_clause": {
|
|
||||||
"type": "SEQ",
|
"type": "SEQ",
|
||||||
"members": [
|
"members": [
|
||||||
{
|
{
|
||||||
"type": "STRING",
|
"type": "STRING",
|
||||||
"value": ":"
|
"value": ":"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "CHOICE",
|
|
||||||
"members": [
|
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "block"
|
"name": "block"
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "BLANK"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -480,82 +437,45 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"command_statement": {
|
"command": {
|
||||||
"type": "CHOICE",
|
"type": "PREC_DYNAMIC",
|
||||||
"members": [
|
"value": 1,
|
||||||
{
|
"content": {
|
||||||
"type": "SYMBOL",
|
"type": "PREC_RIGHT",
|
||||||
"name": "equip_command"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "SYMBOL",
|
|
||||||
"name": "activate_command"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "SYMBOL",
|
|
||||||
"name": "loadout_command"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "SYMBOL",
|
|
||||||
"name": "brew_command"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "SYMBOL",
|
|
||||||
"name": "disable_enable_command"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "SYMBOL",
|
|
||||||
"name": "play_command"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "SYMBOL",
|
|
||||||
"name": "print_command"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"equip_command": {
|
|
||||||
"type": "PREC_LEFT",
|
|
||||||
"value": 0,
|
"value": 0,
|
||||||
"content": {
|
"content": {
|
||||||
"type": "SEQ",
|
"type": "SEQ",
|
||||||
"members": [
|
"members": [
|
||||||
{
|
{
|
||||||
"type": "CHOICE",
|
"type": "SYMBOL",
|
||||||
"members": [
|
"name": "identifier"
|
||||||
{
|
|
||||||
"type": "STRING",
|
|
||||||
"value": "equip"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "STRING",
|
|
||||||
"value": "equipL"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "STRING",
|
|
||||||
"value": "equipR"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "REPEAT1",
|
"type": "REPEAT1",
|
||||||
"content": {
|
"content": {
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "item_criteria"
|
"name": "_command_arg"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"item_criteria": {
|
"_command_arg": {
|
||||||
"type": "PREC_LEFT",
|
|
||||||
"value": 0,
|
|
||||||
"content": {
|
|
||||||
"type": "CHOICE",
|
"type": "CHOICE",
|
||||||
"members": [
|
"members": [
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "identifier"
|
"name": "identifier"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "SYMBOL",
|
||||||
|
"name": "number"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "SYMBOL",
|
||||||
|
"name": "string"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "star_level"
|
"name": "star_level"
|
||||||
@@ -565,7 +485,6 @@
|
|||||||
"name": "enchantment_level"
|
"name": "enchantment_level"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"star_level": {
|
"star_level": {
|
||||||
"type": "SEQ",
|
"type": "SEQ",
|
||||||
@@ -593,162 +512,6 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"activate_command": {
|
|
||||||
"type": "SEQ",
|
|
||||||
"members": [
|
|
||||||
{
|
|
||||||
"type": "STRING",
|
|
||||||
"value": "activate"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "CHOICE",
|
|
||||||
"members": [
|
|
||||||
{
|
|
||||||
"type": "SYMBOL",
|
|
||||||
"name": "identifier"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "STRING",
|
|
||||||
"value": "P"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "STRING",
|
|
||||||
"value": "L"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "STRING",
|
|
||||||
"value": "R"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"loadout_command": {
|
|
||||||
"type": "SEQ",
|
|
||||||
"members": [
|
|
||||||
{
|
|
||||||
"type": "STRING",
|
|
||||||
"value": "loadout"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "SYMBOL",
|
|
||||||
"name": "number"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"brew_command": {
|
|
||||||
"type": "SEQ",
|
|
||||||
"members": [
|
|
||||||
{
|
|
||||||
"type": "STRING",
|
|
||||||
"value": "brew"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "SYMBOL",
|
|
||||||
"name": "identifier"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "REPEAT",
|
|
||||||
"content": {
|
|
||||||
"type": "SEQ",
|
|
||||||
"members": [
|
|
||||||
{
|
|
||||||
"type": "STRING",
|
|
||||||
"value": "+"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "SYMBOL",
|
|
||||||
"name": "identifier"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"disable_enable_command": {
|
|
||||||
"type": "PREC_LEFT",
|
|
||||||
"value": 0,
|
|
||||||
"content": {
|
|
||||||
"type": "SEQ",
|
|
||||||
"members": [
|
|
||||||
{
|
|
||||||
"type": "CHOICE",
|
|
||||||
"members": [
|
|
||||||
{
|
|
||||||
"type": "STRING",
|
|
||||||
"value": "disable"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "STRING",
|
|
||||||
"value": "enable"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "CHOICE",
|
|
||||||
"members": [
|
|
||||||
{
|
|
||||||
"type": "STRING",
|
|
||||||
"value": "abilities"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "STRING",
|
|
||||||
"value": "hud"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "STRING",
|
|
||||||
"value": "banner"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "STRING",
|
|
||||||
"value": "loadout"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "STRING",
|
|
||||||
"value": "npcDialog"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "STRING",
|
|
||||||
"value": "pause"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "STRING",
|
|
||||||
"value": "player"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"play_command": {
|
|
||||||
"type": "PREC_LEFT",
|
|
||||||
"value": 0,
|
|
||||||
"content": {
|
|
||||||
"type": "SEQ",
|
|
||||||
"members": [
|
|
||||||
{
|
|
||||||
"type": "STRING",
|
|
||||||
"value": "play"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "SYMBOL",
|
|
||||||
"name": "identifier"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "CHOICE",
|
|
||||||
"members": [
|
|
||||||
{
|
|
||||||
"type": "SYMBOL",
|
|
||||||
"name": "number"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "BLANK"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"print_command": {
|
"print_command": {
|
||||||
"type": "PREC_RIGHT",
|
"type": "PREC_RIGHT",
|
||||||
"value": 0,
|
"value": 0,
|
||||||
@@ -784,30 +547,124 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "CHOICE",
|
||||||
|
"members": [
|
||||||
|
{
|
||||||
|
"type": "SYMBOL",
|
||||||
|
"name": "print_args"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "BLANK"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "REPEAT",
|
"type": "REPEAT",
|
||||||
|
"content": {
|
||||||
|
"type": "SYMBOL",
|
||||||
|
"name": "print_continuation"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"print_args": {
|
||||||
|
"type": "SEQ",
|
||||||
|
"members": [
|
||||||
|
{
|
||||||
|
"type": "SYMBOL",
|
||||||
|
"name": "print_argument"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "REPEAT",
|
||||||
|
"content": {
|
||||||
|
"type": "SEQ",
|
||||||
|
"members": [
|
||||||
|
{
|
||||||
|
"type": "STRING",
|
||||||
|
"value": ","
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "SYMBOL",
|
||||||
|
"name": "print_argument"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"print_argument": {
|
||||||
|
"type": "PREC_LEFT",
|
||||||
|
"value": 0,
|
||||||
|
"content": {
|
||||||
|
"type": "REPEAT1",
|
||||||
"content": {
|
"content": {
|
||||||
"type": "CHOICE",
|
"type": "CHOICE",
|
||||||
"members": [
|
"members": [
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "identifier"
|
"name": "interpolation"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "string"
|
"name": "string"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "SYMBOL",
|
|
||||||
"name": "number"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "color_code"
|
"name": "color_code"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "SYMBOL",
|
||||||
|
"name": "print_text"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"print_text": {
|
||||||
|
"type": "PATTERN",
|
||||||
|
"value": "[^,@\\r\\n\"]+"
|
||||||
|
},
|
||||||
|
"interpolation": {
|
||||||
|
"type": "SEQ",
|
||||||
|
"members": [
|
||||||
{
|
{
|
||||||
"type": "STRING",
|
"type": "STRING",
|
||||||
"value": ","
|
"value": "@"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "SYMBOL",
|
||||||
|
"name": "_expression"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "STRING",
|
||||||
|
"value": "@"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"print_continuation": {
|
||||||
|
"type": "PREC_RIGHT",
|
||||||
|
"value": 0,
|
||||||
|
"content": {
|
||||||
|
"type": "SEQ",
|
||||||
|
"members": [
|
||||||
|
{
|
||||||
|
"type": "STRING",
|
||||||
|
"value": "^"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "REPEAT",
|
||||||
|
"content": {
|
||||||
|
"type": "CHOICE",
|
||||||
|
"members": [
|
||||||
|
{
|
||||||
|
"type": "PATTERN",
|
||||||
|
"value": "[^@\\r\\n]+"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "SYMBOL",
|
||||||
|
"name": "interpolation"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -888,7 +745,11 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "new_expression"
|
"name": "new_statement"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "SYMBOL",
|
||||||
|
"name": "color_code"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -1443,6 +1304,21 @@
|
|||||||
"type": "CHOICE",
|
"type": "CHOICE",
|
||||||
"members": [
|
"members": [
|
||||||
{
|
{
|
||||||
|
"type": "SYMBOL",
|
||||||
|
"name": "array_elements"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "BLANK"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "STRING",
|
||||||
|
"value": "]"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"array_elements": {
|
||||||
"type": "SEQ",
|
"type": "SEQ",
|
||||||
"members": [
|
"members": [
|
||||||
{
|
{
|
||||||
@@ -1455,8 +1331,8 @@
|
|||||||
"type": "SEQ",
|
"type": "SEQ",
|
||||||
"members": [
|
"members": [
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "STRING",
|
||||||
"name": "comma_sep"
|
"value": ","
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
@@ -1464,13 +1340,6 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "BLANK"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "CHOICE",
|
"type": "CHOICE",
|
||||||
@@ -1483,10 +1352,6 @@
|
|||||||
"type": "BLANK"
|
"type": "BLANK"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "STRING",
|
|
||||||
"value": "]"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -1552,7 +1417,19 @@
|
|||||||
"extras": [
|
"extras": [
|
||||||
{
|
{
|
||||||
"type": "PATTERN",
|
"type": "PATTERN",
|
||||||
"value": "\\s"
|
"value": "[ \\t\\r\\f]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "PATTERN",
|
||||||
|
"value": "[\\r\\n]\\^"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "SYMBOL",
|
||||||
|
"name": "comment"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "SYMBOL",
|
||||||
|
"name": "block_comment"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"conflicts": [
|
"conflicts": [
|
||||||
@@ -1564,18 +1441,19 @@
|
|||||||
"_expression"
|
"_expression"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"command_statement"
|
"command"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"_statement",
|
"_statement",
|
||||||
"_expression"
|
"_expression"
|
||||||
],
|
],
|
||||||
[
|
|
||||||
"equip_command"
|
|
||||||
],
|
|
||||||
[
|
[
|
||||||
"binary_expression",
|
"binary_expression",
|
||||||
"assignment_expression"
|
"assignment_expression"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"command",
|
||||||
|
"_expression"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"precedences": [],
|
"precedences": [],
|
||||||
@@ -1594,6 +1472,6 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"inline": [],
|
"inline": [],
|
||||||
"supertypes": [],
|
"supertypes": []
|
||||||
"reserved": {}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
475
src/node-types.json
generated
475
src/node-types.json
generated
@@ -1,19 +1,4 @@
|
|||||||
[
|
[
|
||||||
{
|
|
||||||
"type": "activate_command",
|
|
||||||
"named": true,
|
|
||||||
"fields": {},
|
|
||||||
"children": {
|
|
||||||
"multiple": false,
|
|
||||||
"required": false,
|
|
||||||
"types": [
|
|
||||||
{
|
|
||||||
"type": "identifier",
|
|
||||||
"named": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "argument_list",
|
"type": "argument_list",
|
||||||
"named": true,
|
"named": true,
|
||||||
@@ -42,6 +27,10 @@
|
|||||||
"type": "call_expression",
|
"type": "call_expression",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "color_code",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "comma_sep",
|
"type": "comma_sep",
|
||||||
"named": true
|
"named": true
|
||||||
@@ -63,7 +52,7 @@
|
|||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "new_expression",
|
"type": "new_statement",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -98,8 +87,23 @@
|
|||||||
"named": true,
|
"named": true,
|
||||||
"fields": {},
|
"fields": {},
|
||||||
"children": {
|
"children": {
|
||||||
"multiple": true,
|
"multiple": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
|
"types": [
|
||||||
|
{
|
||||||
|
"type": "array_elements",
|
||||||
|
"named": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "array_elements",
|
||||||
|
"named": true,
|
||||||
|
"fields": {},
|
||||||
|
"children": {
|
||||||
|
"multiple": true,
|
||||||
|
"required": true,
|
||||||
"types": [
|
"types": [
|
||||||
{
|
{
|
||||||
"type": "array",
|
"type": "array",
|
||||||
@@ -122,7 +126,7 @@
|
|||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "comma_sep",
|
"type": "color_code",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -142,7 +146,7 @@
|
|||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "new_expression",
|
"type": "new_statement",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -200,6 +204,10 @@
|
|||||||
"type": "call_expression",
|
"type": "call_expression",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "color_code",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "float",
|
"type": "float",
|
||||||
"named": true
|
"named": true
|
||||||
@@ -217,7 +225,7 @@
|
|||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "new_expression",
|
"type": "new_statement",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -275,6 +283,10 @@
|
|||||||
"type": "call_expression",
|
"type": "call_expression",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "color_code",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "float",
|
"type": "float",
|
||||||
"named": true
|
"named": true
|
||||||
@@ -292,7 +304,7 @@
|
|||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "new_expression",
|
"type": "new_statement",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -339,7 +351,7 @@
|
|||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "command_statement",
|
"type": "command",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -358,10 +370,6 @@
|
|||||||
"type": "else_clause",
|
"type": "else_clause",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "else_if_clause",
|
|
||||||
"named": true
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "expression_statement",
|
"type": "expression_statement",
|
||||||
"named": true
|
"named": true
|
||||||
@@ -379,7 +387,7 @@
|
|||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "new_expression",
|
"type": "print_command",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -398,21 +406,6 @@
|
|||||||
"named": true,
|
"named": true,
|
||||||
"fields": {}
|
"fields": {}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "brew_command",
|
|
||||||
"named": true,
|
|
||||||
"fields": {},
|
|
||||||
"children": {
|
|
||||||
"multiple": true,
|
|
||||||
"required": true,
|
|
||||||
"types": [
|
|
||||||
{
|
|
||||||
"type": "identifier",
|
|
||||||
"named": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "call_expression",
|
"type": "call_expression",
|
||||||
"named": true,
|
"named": true,
|
||||||
@@ -441,6 +434,10 @@
|
|||||||
"type": "call_expression",
|
"type": "call_expression",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "color_code",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "float",
|
"type": "float",
|
||||||
"named": true
|
"named": true
|
||||||
@@ -458,7 +455,7 @@
|
|||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "new_expression",
|
"type": "new_statement",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -505,39 +502,31 @@
|
|||||||
"fields": {}
|
"fields": {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "command_statement",
|
"type": "command",
|
||||||
"named": true,
|
"named": true,
|
||||||
"fields": {},
|
"fields": {},
|
||||||
"children": {
|
"children": {
|
||||||
"multiple": false,
|
"multiple": true,
|
||||||
"required": true,
|
"required": true,
|
||||||
"types": [
|
"types": [
|
||||||
{
|
{
|
||||||
"type": "activate_command",
|
"type": "enchantment_level",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "brew_command",
|
"type": "identifier",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "disable_enable_command",
|
"type": "number",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "equip_command",
|
"type": "star_level",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "loadout_command",
|
"type": "string",
|
||||||
"named": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "play_command",
|
|
||||||
"named": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "print_command",
|
|
||||||
"named": true
|
"named": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -575,6 +564,10 @@
|
|||||||
"type": "call_expression",
|
"type": "call_expression",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "color_code",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "float",
|
"type": "float",
|
||||||
"named": true
|
"named": true
|
||||||
@@ -592,7 +585,7 @@
|
|||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "new_expression",
|
"type": "new_statement",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -622,30 +615,10 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "disable_enable_command",
|
|
||||||
"named": true,
|
|
||||||
"fields": {}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "else_clause",
|
"type": "else_clause",
|
||||||
"named": true,
|
"named": true,
|
||||||
"fields": {},
|
"fields": {},
|
||||||
"children": {
|
|
||||||
"multiple": false,
|
|
||||||
"required": false,
|
|
||||||
"types": [
|
|
||||||
{
|
|
||||||
"type": "block",
|
|
||||||
"named": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "else_if_clause",
|
|
||||||
"named": true,
|
|
||||||
"fields": {},
|
|
||||||
"children": {
|
"children": {
|
||||||
"multiple": true,
|
"multiple": true,
|
||||||
"required": true,
|
"required": true,
|
||||||
@@ -674,6 +647,10 @@
|
|||||||
"type": "call_expression",
|
"type": "call_expression",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "color_code",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "float",
|
"type": "float",
|
||||||
"named": true
|
"named": true
|
||||||
@@ -691,7 +668,7 @@
|
|||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "new_expression",
|
"type": "new_statement",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -736,21 +713,6 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "equip_command",
|
|
||||||
"named": true,
|
|
||||||
"fields": {},
|
|
||||||
"children": {
|
|
||||||
"multiple": true,
|
|
||||||
"required": true,
|
|
||||||
"types": [
|
|
||||||
{
|
|
||||||
"type": "item_criteria",
|
|
||||||
"named": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "expression_statement",
|
"type": "expression_statement",
|
||||||
"named": true,
|
"named": true,
|
||||||
@@ -779,6 +741,10 @@
|
|||||||
"type": "call_expression",
|
"type": "call_expression",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "color_code",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "float",
|
"type": "float",
|
||||||
"named": true
|
"named": true
|
||||||
@@ -796,7 +762,7 @@
|
|||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "new_expression",
|
"type": "new_statement",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -858,6 +824,10 @@
|
|||||||
"type": "call_expression",
|
"type": "call_expression",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "color_code",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "float",
|
"type": "float",
|
||||||
"named": true
|
"named": true
|
||||||
@@ -875,7 +845,7 @@
|
|||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "new_expression",
|
"type": "new_statement",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -905,77 +875,6 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "function_body",
|
|
||||||
"named": true,
|
|
||||||
"fields": {},
|
|
||||||
"children": {
|
|
||||||
"multiple": true,
|
|
||||||
"required": true,
|
|
||||||
"types": [
|
|
||||||
{
|
|
||||||
"type": "block_comment",
|
|
||||||
"named": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "break_statement",
|
|
||||||
"named": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "command_statement",
|
|
||||||
"named": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "comment",
|
|
||||||
"named": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "conditional",
|
|
||||||
"named": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "continue_statement",
|
|
||||||
"named": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "else_clause",
|
|
||||||
"named": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "else_if_clause",
|
|
||||||
"named": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "expression_statement",
|
|
||||||
"named": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "for_loop",
|
|
||||||
"named": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "function_declaration",
|
|
||||||
"named": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "import_statement",
|
|
||||||
"named": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "new_expression",
|
|
||||||
"named": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "return_statement",
|
|
||||||
"named": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "variable_declaration",
|
|
||||||
"named": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "function_declaration",
|
"type": "function_declaration",
|
||||||
"named": true,
|
"named": true,
|
||||||
@@ -993,10 +892,10 @@
|
|||||||
},
|
},
|
||||||
"children": {
|
"children": {
|
||||||
"multiple": true,
|
"multiple": true,
|
||||||
"required": false,
|
"required": true,
|
||||||
"types": [
|
"types": [
|
||||||
{
|
{
|
||||||
"type": "function_body",
|
"type": "block",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1049,6 +948,10 @@
|
|||||||
"type": "call_expression",
|
"type": "call_expression",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "color_code",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "float",
|
"type": "float",
|
||||||
"named": true
|
"named": true
|
||||||
@@ -1066,7 +969,7 @@
|
|||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "new_expression",
|
"type": "new_statement",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1097,7 +1000,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "item_criteria",
|
"type": "interpolation",
|
||||||
"named": true,
|
"named": true,
|
||||||
"fields": {},
|
"fields": {},
|
||||||
"children": {
|
"children": {
|
||||||
@@ -1105,7 +1008,31 @@
|
|||||||
"required": true,
|
"required": true,
|
||||||
"types": [
|
"types": [
|
||||||
{
|
{
|
||||||
"type": "enchantment_level",
|
"type": "array",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "assignment_expression",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "binary_expression",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "boolean",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "call_expression",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "color_code",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "float",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1113,23 +1040,40 @@
|
|||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "star_level",
|
"type": "index_expression",
|
||||||
"named": true
|
"named": true
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "loadout_command",
|
"type": "member_expression",
|
||||||
"named": true,
|
"named": true
|
||||||
"fields": {},
|
},
|
||||||
"children": {
|
{
|
||||||
"multiple": false,
|
"type": "new_statement",
|
||||||
"required": true,
|
"named": true
|
||||||
"types": [
|
},
|
||||||
|
{
|
||||||
|
"type": "null",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"named": true
|
"named": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "parenthesized_expression",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "unary_expression",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "update_expression",
|
||||||
|
"named": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1162,6 +1106,10 @@
|
|||||||
"type": "call_expression",
|
"type": "call_expression",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "color_code",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "float",
|
"type": "float",
|
||||||
"named": true
|
"named": true
|
||||||
@@ -1179,7 +1127,7 @@
|
|||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "new_expression",
|
"type": "new_statement",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1221,7 +1169,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "new_expression",
|
"type": "new_statement",
|
||||||
"named": true,
|
"named": true,
|
||||||
"fields": {},
|
"fields": {},
|
||||||
"children": {
|
"children": {
|
||||||
@@ -1278,6 +1226,10 @@
|
|||||||
"type": "call_expression",
|
"type": "call_expression",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "color_code",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "float",
|
"type": "float",
|
||||||
"named": true
|
"named": true
|
||||||
@@ -1295,7 +1247,7 @@
|
|||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "new_expression",
|
"type": "new_statement",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1326,7 +1278,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "play_command",
|
"type": "print_args",
|
||||||
"named": true,
|
"named": true,
|
||||||
"fields": {},
|
"fields": {},
|
||||||
"children": {
|
"children": {
|
||||||
@@ -1334,11 +1286,34 @@
|
|||||||
"required": true,
|
"required": true,
|
||||||
"types": [
|
"types": [
|
||||||
{
|
{
|
||||||
"type": "identifier",
|
"type": "print_argument",
|
||||||
|
"named": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "print_argument",
|
||||||
|
"named": true,
|
||||||
|
"fields": {},
|
||||||
|
"children": {
|
||||||
|
"multiple": true,
|
||||||
|
"required": true,
|
||||||
|
"types": [
|
||||||
|
{
|
||||||
|
"type": "color_code",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "number",
|
"type": "interpolation",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "print_text",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
"named": true
|
"named": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -1353,19 +1328,26 @@
|
|||||||
"required": false,
|
"required": false,
|
||||||
"types": [
|
"types": [
|
||||||
{
|
{
|
||||||
"type": "color_code",
|
"type": "print_args",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "identifier",
|
"type": "print_continuation",
|
||||||
"named": true
|
"named": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "number",
|
"type": "print_continuation",
|
||||||
"named": true
|
"named": true,
|
||||||
},
|
"fields": {},
|
||||||
|
"children": {
|
||||||
|
"multiple": true,
|
||||||
|
"required": false,
|
||||||
|
"types": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "interpolation",
|
||||||
"named": true
|
"named": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -1399,6 +1381,10 @@
|
|||||||
"type": "call_expression",
|
"type": "call_expression",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "color_code",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "float",
|
"type": "float",
|
||||||
"named": true
|
"named": true
|
||||||
@@ -1416,7 +1402,7 @@
|
|||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "new_expression",
|
"type": "new_statement",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1449,7 +1435,6 @@
|
|||||||
{
|
{
|
||||||
"type": "source_file",
|
"type": "source_file",
|
||||||
"named": true,
|
"named": true,
|
||||||
"root": true,
|
|
||||||
"fields": {},
|
"fields": {},
|
||||||
"children": {
|
"children": {
|
||||||
"multiple": true,
|
"multiple": true,
|
||||||
@@ -1464,7 +1449,7 @@
|
|||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "command_statement",
|
"type": "command",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1483,10 +1468,6 @@
|
|||||||
"type": "else_clause",
|
"type": "else_clause",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "else_if_clause",
|
|
||||||
"named": true
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "expression_statement",
|
"type": "expression_statement",
|
||||||
"named": true
|
"named": true
|
||||||
@@ -1504,7 +1485,7 @@
|
|||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "new_expression",
|
"type": "print_command",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1566,6 +1547,10 @@
|
|||||||
"type": "call_expression",
|
"type": "call_expression",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "color_code",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "float",
|
"type": "float",
|
||||||
"named": true
|
"named": true
|
||||||
@@ -1583,7 +1568,7 @@
|
|||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "new_expression",
|
"type": "new_statement",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1641,6 +1626,10 @@
|
|||||||
"type": "call_expression",
|
"type": "call_expression",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "color_code",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "float",
|
"type": "float",
|
||||||
"named": true
|
"named": true
|
||||||
@@ -1658,7 +1647,7 @@
|
|||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "new_expression",
|
"type": "new_statement",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1726,6 +1715,10 @@
|
|||||||
"type": "call_expression",
|
"type": "call_expression",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "color_code",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "float",
|
"type": "float",
|
||||||
"named": true
|
"named": true
|
||||||
@@ -1743,7 +1736,7 @@
|
|||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "new_expression",
|
"type": "new_statement",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1903,15 +1896,7 @@
|
|||||||
"named": false
|
"named": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "L",
|
"type": "@",
|
||||||
"named": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "P",
|
|
||||||
"named": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "R",
|
|
||||||
"named": false
|
"named": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1923,15 +1908,7 @@
|
|||||||
"named": false
|
"named": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "abilities",
|
"type": "^",
|
||||||
"named": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "activate",
|
|
||||||
"named": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "banner",
|
|
||||||
"named": false
|
"named": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1942,10 +1919,6 @@
|
|||||||
"type": "break_statement",
|
"type": "break_statement",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "brew",
|
|
||||||
"named": false
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "color_code",
|
"type": "color_code",
|
||||||
"named": true
|
"named": true
|
||||||
@@ -1958,26 +1931,6 @@
|
|||||||
"type": "continue_statement",
|
"type": "continue_statement",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "disable",
|
|
||||||
"named": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "enable",
|
|
||||||
"named": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "equip",
|
|
||||||
"named": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "equipL",
|
|
||||||
"named": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "equipR",
|
|
||||||
"named": false
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "false",
|
"type": "false",
|
||||||
"named": false
|
"named": false
|
||||||
@@ -1994,10 +1947,6 @@
|
|||||||
"type": "func",
|
"type": "func",
|
||||||
"named": false
|
"named": false
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "hud",
|
|
||||||
"named": false
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "identifier",
|
"type": "identifier",
|
||||||
"named": true
|
"named": true
|
||||||
@@ -2006,10 +1955,6 @@
|
|||||||
"type": "import",
|
"type": "import",
|
||||||
"named": false
|
"named": false
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "loadout",
|
|
||||||
"named": false
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "module_path",
|
"type": "module_path",
|
||||||
"named": true
|
"named": true
|
||||||
@@ -2018,10 +1963,6 @@
|
|||||||
"type": "new",
|
"type": "new",
|
||||||
"named": false
|
"named": false
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "npcDialog",
|
|
||||||
"named": false
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "null",
|
"type": "null",
|
||||||
"named": true
|
"named": true
|
||||||
@@ -2031,16 +1972,8 @@
|
|||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "pause",
|
"type": "print_text",
|
||||||
"named": false
|
"named": true
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "play",
|
|
||||||
"named": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "player",
|
|
||||||
"named": false
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "return",
|
"type": "return",
|
||||||
|
|||||||
32344
src/parser.c
generated
32344
src/parser.c
generated
File diff suppressed because it is too large
Load Diff
@@ -6,8 +6,13 @@ enum TokenType {
|
|||||||
NEWLINE,
|
NEWLINE,
|
||||||
INDENT,
|
INDENT,
|
||||||
DEDENT,
|
DEDENT,
|
||||||
|
// ASCII_CONTENT,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// ... (skipping to logic)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint16_t *indent_stack;
|
uint16_t *indent_stack;
|
||||||
size_t indent_stack_size;
|
size_t indent_stack_size;
|
||||||
@@ -63,10 +68,15 @@ unsigned tree_sitter_stonescript_external_scanner_serialize(void *payload, char
|
|||||||
|
|
||||||
void tree_sitter_stonescript_external_scanner_deserialize(void *payload, const char *buffer, unsigned length) {
|
void tree_sitter_stonescript_external_scanner_deserialize(void *payload, const char *buffer, unsigned length) {
|
||||||
Scanner *scanner = (Scanner *)payload;
|
Scanner *scanner = (Scanner *)payload;
|
||||||
|
size_t size = 0;
|
||||||
|
|
||||||
scanner->indent_stack_size = 1;
|
scanner->indent_stack_size = 1;
|
||||||
scanner->indent_stack[0] = 0;
|
scanner->indent_stack[0] = 0;
|
||||||
scanner->queued_tokens_size = 0;
|
scanner->queued_tokens_size = 0;
|
||||||
|
|
||||||
|
if (length < sizeof(uint32_t)) return;
|
||||||
|
uint32_t indent_stack_size = 0;
|
||||||
|
|
||||||
if (length == 0) return;
|
if (length == 0) return;
|
||||||
|
|
||||||
size_t i = 0;
|
size_t i = 0;
|
||||||
@@ -91,6 +101,65 @@ void tree_sitter_stonescript_external_scanner_deserialize(void *payload, const c
|
|||||||
bool tree_sitter_stonescript_external_scanner_scan(void *payload, TSLexer *lexer, const bool *valid_symbols) {
|
bool tree_sitter_stonescript_external_scanner_scan(void *payload, TSLexer *lexer, const bool *valid_symbols) {
|
||||||
Scanner *scanner = (Scanner *)payload;
|
Scanner *scanner = (Scanner *)payload;
|
||||||
|
|
||||||
|
// if (valid_symbols[ASCII_CONTENT]) {
|
||||||
|
// bool has_content = false;
|
||||||
|
//
|
||||||
|
// for (;;) {
|
||||||
|
// if (lexer->eof(lexer)) {
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// // Check if we're at the start of a line with 'asciiend'
|
||||||
|
// if (lexer->lookahead == '\n' || lexer->lookahead == '\r') {
|
||||||
|
// lexer->advance(lexer, false);
|
||||||
|
// if (lexer->lookahead == '\r' || lexer->lookahead == '\n') {
|
||||||
|
// lexer->advance(lexer, false);
|
||||||
|
// }
|
||||||
|
// lexer->mark_end(lexer);
|
||||||
|
// has_content = true;
|
||||||
|
//
|
||||||
|
// // Skip whitespace at the start of the line
|
||||||
|
// while (lexer->lookahead == ' ' || lexer->lookahead == '\t') {
|
||||||
|
// lexer->advance(lexer, false);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// // Check if this line starts with 'asciiend'
|
||||||
|
// if (lexer->lookahead == 'a') {
|
||||||
|
// const char *keyword = "asciiend";
|
||||||
|
// bool match = true;
|
||||||
|
//
|
||||||
|
// for (int k = 0; k < 8; k++) {
|
||||||
|
// if (lexer->lookahead == keyword[k]) {
|
||||||
|
// lexer->advance(lexer, false);
|
||||||
|
// } else {
|
||||||
|
// match = false;
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// // Check that asciiend is followed by whitespace or EOL
|
||||||
|
// if (match && (lexer->lookahead == '\n' || lexer->lookahead == '\r' ||
|
||||||
|
// lexer->lookahead == ' ' || lexer->lookahead == '\t' ||
|
||||||
|
// lexer->lookahead == ',' ||
|
||||||
|
// lexer->eof(lexer))) {
|
||||||
|
// lexer->result_symbol = ASCII_CONTENT;
|
||||||
|
// return has_content;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// // Failed to match asciiend, mark the current position
|
||||||
|
// lexer->mark_end(lexer);
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// lexer->advance(lexer, false);
|
||||||
|
// lexer->mark_end(lexer);
|
||||||
|
// has_content = true;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// lexer->result_symbol = ASCII_CONTENT;
|
||||||
|
// return has_content;
|
||||||
|
// }
|
||||||
|
|
||||||
if (scanner->queued_tokens_size > 0) {
|
if (scanner->queued_tokens_size > 0) {
|
||||||
enum TokenType token = scanner->queued_tokens[0];
|
enum TokenType token = scanner->queued_tokens[0];
|
||||||
for (size_t i = 1; i < scanner->queued_tokens_size; i++) {
|
for (size_t i = 1; i < scanner->queued_tokens_size; i++) {
|
||||||
@@ -128,6 +197,8 @@ bool tree_sitter_stonescript_external_scanner_scan(void *payload, TSLexer *lexer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (found_end_of_line) {
|
if (found_end_of_line) {
|
||||||
uint16_t current_indent = scanner->indent_stack[scanner->indent_stack_size - 1];
|
uint16_t current_indent = scanner->indent_stack[scanner->indent_stack_size - 1];
|
||||||
|
|
||||||
@@ -141,7 +212,9 @@ bool tree_sitter_stonescript_external_scanner_scan(void *payload, TSLexer *lexer
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (valid_symbols[DEDENT] && indent_length < current_indent && scanner->indent_stack_size > 1) {
|
|
||||||
|
|
||||||
|
if (valid_symbols[DEDENT] && (indent_length < current_indent || (lexer->eof(lexer) && current_indent == 0)) && scanner->indent_stack_size > 1) {
|
||||||
scanner->indent_stack_size--;
|
scanner->indent_stack_size--;
|
||||||
|
|
||||||
while (scanner->indent_stack_size > 1 &&
|
while (scanner->indent_stack_size > 1 &&
|
||||||
@@ -157,6 +230,7 @@ bool tree_sitter_stonescript_external_scanner_scan(void *payload, TSLexer *lexer
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (valid_symbols[NEWLINE] && !lexer->eof(lexer)) {
|
if (valid_symbols[NEWLINE] && !lexer->eof(lexer)) {
|
||||||
|
lexer->mark_end(lexer);
|
||||||
lexer->result_symbol = NEWLINE;
|
lexer->result_symbol = NEWLINE;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,17 +13,12 @@ extern "C" {
|
|||||||
#define ts_builtin_sym_end 0
|
#define ts_builtin_sym_end 0
|
||||||
#define TREE_SITTER_SERIALIZATION_BUFFER_SIZE 1024
|
#define TREE_SITTER_SERIALIZATION_BUFFER_SIZE 1024
|
||||||
|
|
||||||
#ifndef TREE_SITTER_API_H_
|
|
||||||
typedef uint16_t TSStateId;
|
typedef uint16_t TSStateId;
|
||||||
|
|
||||||
|
#ifndef TREE_SITTER_API_H_
|
||||||
typedef uint16_t TSSymbol;
|
typedef uint16_t TSSymbol;
|
||||||
typedef uint16_t TSFieldId;
|
typedef uint16_t TSFieldId;
|
||||||
typedef struct TSLanguage TSLanguage;
|
typedef struct TSLanguage TSLanguage;
|
||||||
typedef struct TSLanguageMetadata TSLanguageMetadata;
|
|
||||||
typedef struct TSLanguageMetadata {
|
|
||||||
uint8_t major_version;
|
|
||||||
uint8_t minor_version;
|
|
||||||
uint8_t patch_version;
|
|
||||||
} TSLanguageMetadata;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@@ -32,11 +27,10 @@ typedef struct {
|
|||||||
bool inherited;
|
bool inherited;
|
||||||
} TSFieldMapEntry;
|
} TSFieldMapEntry;
|
||||||
|
|
||||||
// Used to index the field and supertype maps.
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint16_t index;
|
uint16_t index;
|
||||||
uint16_t length;
|
uint16_t length;
|
||||||
} TSMapSlice;
|
} TSFieldMapSlice;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
bool visible;
|
bool visible;
|
||||||
@@ -54,7 +48,6 @@ struct TSLexer {
|
|||||||
uint32_t (*get_column)(TSLexer *);
|
uint32_t (*get_column)(TSLexer *);
|
||||||
bool (*is_at_included_range_start)(const TSLexer *);
|
bool (*is_at_included_range_start)(const TSLexer *);
|
||||||
bool (*eof)(const TSLexer *);
|
bool (*eof)(const TSLexer *);
|
||||||
void (*log)(const TSLexer *, const char *, ...);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
@@ -86,12 +79,6 @@ typedef struct {
|
|||||||
uint16_t external_lex_state;
|
uint16_t external_lex_state;
|
||||||
} TSLexMode;
|
} TSLexMode;
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
uint16_t lex_state;
|
|
||||||
uint16_t external_lex_state;
|
|
||||||
uint16_t reserved_word_set_id;
|
|
||||||
} TSLexerMode;
|
|
||||||
|
|
||||||
typedef union {
|
typedef union {
|
||||||
TSParseAction action;
|
TSParseAction action;
|
||||||
struct {
|
struct {
|
||||||
@@ -100,13 +87,8 @@ typedef union {
|
|||||||
} entry;
|
} entry;
|
||||||
} TSParseActionEntry;
|
} TSParseActionEntry;
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
int32_t start;
|
|
||||||
int32_t end;
|
|
||||||
} TSCharacterRange;
|
|
||||||
|
|
||||||
struct TSLanguage {
|
struct TSLanguage {
|
||||||
uint32_t abi_version;
|
uint32_t version;
|
||||||
uint32_t symbol_count;
|
uint32_t symbol_count;
|
||||||
uint32_t alias_count;
|
uint32_t alias_count;
|
||||||
uint32_t token_count;
|
uint32_t token_count;
|
||||||
@@ -122,13 +104,13 @@ struct TSLanguage {
|
|||||||
const TSParseActionEntry *parse_actions;
|
const TSParseActionEntry *parse_actions;
|
||||||
const char * const *symbol_names;
|
const char * const *symbol_names;
|
||||||
const char * const *field_names;
|
const char * const *field_names;
|
||||||
const TSMapSlice *field_map_slices;
|
const TSFieldMapSlice *field_map_slices;
|
||||||
const TSFieldMapEntry *field_map_entries;
|
const TSFieldMapEntry *field_map_entries;
|
||||||
const TSSymbolMetadata *symbol_metadata;
|
const TSSymbolMetadata *symbol_metadata;
|
||||||
const TSSymbol *public_symbol_map;
|
const TSSymbol *public_symbol_map;
|
||||||
const uint16_t *alias_map;
|
const uint16_t *alias_map;
|
||||||
const TSSymbol *alias_sequences;
|
const TSSymbol *alias_sequences;
|
||||||
const TSLexerMode *lex_modes;
|
const TSLexMode *lex_modes;
|
||||||
bool (*lex_fn)(TSLexer *, TSStateId);
|
bool (*lex_fn)(TSLexer *, TSStateId);
|
||||||
bool (*keyword_lex_fn)(TSLexer *, TSStateId);
|
bool (*keyword_lex_fn)(TSLexer *, TSStateId);
|
||||||
TSSymbol keyword_capture_token;
|
TSSymbol keyword_capture_token;
|
||||||
@@ -142,48 +124,15 @@ struct TSLanguage {
|
|||||||
void (*deserialize)(void *, const char *, unsigned);
|
void (*deserialize)(void *, const char *, unsigned);
|
||||||
} external_scanner;
|
} external_scanner;
|
||||||
const TSStateId *primary_state_ids;
|
const TSStateId *primary_state_ids;
|
||||||
const char *name;
|
|
||||||
const TSSymbol *reserved_words;
|
|
||||||
uint16_t max_reserved_word_set_size;
|
|
||||||
uint32_t supertype_count;
|
|
||||||
const TSSymbol *supertype_symbols;
|
|
||||||
const TSMapSlice *supertype_map_slices;
|
|
||||||
const TSSymbol *supertype_map_entries;
|
|
||||||
TSLanguageMetadata metadata;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline bool set_contains(const TSCharacterRange *ranges, uint32_t len, int32_t lookahead) {
|
|
||||||
uint32_t index = 0;
|
|
||||||
uint32_t size = len - index;
|
|
||||||
while (size > 1) {
|
|
||||||
uint32_t half_size = size / 2;
|
|
||||||
uint32_t mid_index = index + half_size;
|
|
||||||
const TSCharacterRange *range = &ranges[mid_index];
|
|
||||||
if (lookahead >= range->start && lookahead <= range->end) {
|
|
||||||
return true;
|
|
||||||
} else if (lookahead > range->end) {
|
|
||||||
index = mid_index;
|
|
||||||
}
|
|
||||||
size -= half_size;
|
|
||||||
}
|
|
||||||
const TSCharacterRange *range = &ranges[index];
|
|
||||||
return (lookahead >= range->start && lookahead <= range->end);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Lexer Macros
|
* Lexer Macros
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#define UNUSED __pragma(warning(suppress : 4101))
|
|
||||||
#else
|
|
||||||
#define UNUSED __attribute__((unused))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define START_LEXER() \
|
#define START_LEXER() \
|
||||||
bool result = false; \
|
bool result = false; \
|
||||||
bool skip = false; \
|
bool skip = false; \
|
||||||
UNUSED \
|
|
||||||
bool eof = false; \
|
bool eof = false; \
|
||||||
int32_t lookahead; \
|
int32_t lookahead; \
|
||||||
goto start; \
|
goto start; \
|
||||||
@@ -199,17 +148,6 @@ static inline bool set_contains(const TSCharacterRange *ranges, uint32_t len, in
|
|||||||
goto next_state; \
|
goto next_state; \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define ADVANCE_MAP(...) \
|
|
||||||
{ \
|
|
||||||
static const uint16_t map[] = { __VA_ARGS__ }; \
|
|
||||||
for (uint32_t i = 0; i < sizeof(map) / sizeof(map[0]); i += 2) { \
|
|
||||||
if (map[i] == lookahead) { \
|
|
||||||
state = map[i + 1]; \
|
|
||||||
goto next_state; \
|
|
||||||
} \
|
|
||||||
} \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define SKIP(state_value) \
|
#define SKIP(state_value) \
|
||||||
{ \
|
{ \
|
||||||
skip = true; \
|
skip = true; \
|
||||||
@@ -228,7 +166,7 @@ static inline bool set_contains(const TSCharacterRange *ranges, uint32_t len, in
|
|||||||
* Parse Table Macros
|
* Parse Table Macros
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define SMALL_STATE(id) ((id) - LARGE_STATE_COUNT)
|
#define SMALL_STATE(id) id - LARGE_STATE_COUNT
|
||||||
|
|
||||||
#define STATE(id) id
|
#define STATE(id) id
|
||||||
|
|
||||||
@@ -238,7 +176,7 @@ static inline bool set_contains(const TSCharacterRange *ranges, uint32_t len, in
|
|||||||
{{ \
|
{{ \
|
||||||
.shift = { \
|
.shift = { \
|
||||||
.type = TSParseActionTypeShift, \
|
.type = TSParseActionTypeShift, \
|
||||||
.state = (state_value) \
|
.state = state_value \
|
||||||
} \
|
} \
|
||||||
}}
|
}}
|
||||||
|
|
||||||
@@ -246,7 +184,7 @@ static inline bool set_contains(const TSCharacterRange *ranges, uint32_t len, in
|
|||||||
{{ \
|
{{ \
|
||||||
.shift = { \
|
.shift = { \
|
||||||
.type = TSParseActionTypeShift, \
|
.type = TSParseActionTypeShift, \
|
||||||
.state = (state_value), \
|
.state = state_value, \
|
||||||
.repetition = true \
|
.repetition = true \
|
||||||
} \
|
} \
|
||||||
}}
|
}}
|
||||||
@@ -259,14 +197,13 @@ static inline bool set_contains(const TSCharacterRange *ranges, uint32_t len, in
|
|||||||
} \
|
} \
|
||||||
}}
|
}}
|
||||||
|
|
||||||
#define REDUCE(symbol_name, children, precedence, prod_id) \
|
#define REDUCE(symbol_val, child_count_val, ...) \
|
||||||
{{ \
|
{{ \
|
||||||
.reduce = { \
|
.reduce = { \
|
||||||
.type = TSParseActionTypeReduce, \
|
.type = TSParseActionTypeReduce, \
|
||||||
.symbol = symbol_name, \
|
.symbol = symbol_val, \
|
||||||
.child_count = children, \
|
.child_count = child_count_val, \
|
||||||
.dynamic_precedence = precedence, \
|
__VA_ARGS__ \
|
||||||
.production_id = prod_id \
|
|
||||||
}, \
|
}, \
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user