Skip to content

Commit

Permalink
fixing escape sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
ganezdragon committed Sep 24, 2023
1 parent 79e88f6 commit 15a6914
Show file tree
Hide file tree
Showing 3 changed files with 3,936 additions and 4,236 deletions.
4 changes: 1 addition & 3 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -1687,9 +1687,7 @@ module.exports = grammar({
// https://perldoc.perl.org/perlop#Quote-and-Quote-like-Operators
escape_sequence: $ => prec(PRECEDENCE.ESCAPE_SEQ, seq(
'\\',
token.immediate(
/[tnrfbae]/,
),
/[tnrfbae]/,
)),

// escape_character: $ => '\\[.]+',
Expand Down
269 changes: 3 additions & 266 deletions src/grammar.json
Original file line number Diff line number Diff line change
Expand Up @@ -8454,11 +8454,8 @@
"value": "\\"
},
{
"type": "IMMEDIATE_TOKEN",
"content": {
"type": "PATTERN",
"value": "[tnrfbae]"
}
"type": "PATTERN",
"value": "[tnrfbae]"
}
]
}
Expand Down Expand Up @@ -9474,267 +9471,7 @@
"value": "[\\s\\uFEFF\\u2060\\u200B\\u00A0]"
}
],
"conflicts": [
[
"_boolean",
"call_expression"
],
[
"_auto_increment_decrement"
],
[
"binary_expression",
"_bodmas_2",
"_shift_expression"
],
[
"binary_expression",
"_bodmas_2",
"_equality_expression"
],
[
"binary_expression",
"_bodmas_2",
"_class_instance_exp"
],
[
"binary_expression",
"_bodmas_2",
"_bitwise_and_exp"
],
[
"binary_expression",
"_bodmas_2",
"_bitwise_or_xor_exp"
],
[
"binary_expression",
"_bodmas_2",
"_logical_and_exp"
],
[
"binary_expression",
"_bodmas_2",
"_logical_ors_exp"
],
[
"binary_expression",
"_bodmas_2",
"_range_exp"
],
[
"binary_expression",
"_bodmas_2",
"_assignment_exp"
],
[
"binary_expression",
"_bodmas_2",
"ternary_expression"
],
[
"binary_expression",
"_bodmas_2",
"_unary_not"
],
[
"binary_expression",
"_bodmas_2",
"_unary_and"
],
[
"binary_expression",
"_bodmas_2",
"_logical_verbal_or_xor"
],
[
"binary_expression",
"_bodmas_2",
"join_function"
],
[
"binary_expression",
"_bodmas_2",
"push_function"
],
[
"binary_expression",
"_bodmas_2",
"grep_or_map_function"
],
[
"binary_expression",
"_bodmas_2",
"unpack_function"
],
[
"binary_expression",
"_bodmas_2",
"arguments"
],
[
"_range_exp"
],
[
"_class_instance_exp"
],
[
"_primitive_expression",
"_list"
],
[
"standalone_block",
"hash_ref"
],
[
"goto_expression",
"_expression"
],
[
"_expression"
],
[
"_expression_without_bareword"
],
[
"bareword_import",
"package_name"
],
[
"package_name"
],
[
"_list",
"_variables"
],
[
"_dereference"
],
[
"_scalar_type",
"key_value_pair"
],
[
"hash_ref"
],
[
"hash"
],
[
"hash_ref",
"_dereference"
],
[
"_expression_without_bareword",
"arguments"
],
[
"arguments",
"array"
],
[
"_expression",
"method_invocation"
],
[
"_expression",
"goto_expression",
"method_invocation"
],
[
"_expression",
"scalar_dereference"
],
[
"special_scalar_variable",
"scalar_dereference"
],
[
"hash",
"_dereference"
],
[
"_variables",
"interpolation"
],
[
"_variables",
"hash_ref"
],
[
"string_double_quoted"
],
[
"named_block_statement",
"hash_ref"
],
[
"variable_declarator",
"_variables"
],
[
"loop_control_statement"
],
[
"variable_declarator",
"function_signature"
],
[
"array_access_variable",
"array_ref"
],
[
"named_block_statement",
"hash_access_variable"
],
[
"list_block",
"hash_ref"
],
[
"_expression_without_bareword",
"sort_function"
],
[
"_expression_without_bareword",
"goto_expression"
],
[
"_expression_without_bareword",
"method_invocation"
],
[
"_expression_without_bareword",
"goto_expression",
"method_invocation"
],
[
"_expression_without_bareword",
"_string"
],
[
"list_block"
],
[
"method_invocation",
"scalar_dereference"
],
[
"method_invocation",
"hash_dereference"
],
[
"method_invocation",
"array_dereference"
],
[
"variable_declaration"
],
[
"variable_declaration",
"key_value_pair"
]
],
"conflicts": [],
"precedences": [],
"externals": [
{
Expand Down
Loading

0 comments on commit 15a6914

Please sign in to comment.