mirror of
https://github.com/elladunbar/tree-sitter-hy.git
synced 2025-11-05 14:59:55 -06:00
Add python code macros and spelling
This commit is contained in:
parent
ed44ef8755
commit
4be821f08d
6 changed files with 7754 additions and 7291 deletions
11
grammar.js
11
grammar.js
|
|
@ -47,6 +47,7 @@ module.exports = grammar({
|
|||
$.class,
|
||||
$.macro,
|
||||
$.reader,
|
||||
$.py,
|
||||
),
|
||||
|
||||
_form: $ => seq(optional($.sugar), choice($._identifier, $._sequence, $._string)),
|
||||
|
|
@ -225,6 +226,14 @@ module.exports = grammar({
|
|||
repeat($._element),
|
||||
')',
|
||||
),
|
||||
py: $ => seq(
|
||||
'(',
|
||||
choice('py', 'pys'),
|
||||
'"',
|
||||
$.code,
|
||||
'"',
|
||||
')',
|
||||
),
|
||||
|
||||
module_import: $ => seq(
|
||||
choice(
|
||||
|
|
@ -308,6 +317,8 @@ module.exports = grammar({
|
|||
']',
|
||||
),
|
||||
|
||||
code: _ => /[^"]*/,
|
||||
|
||||
_variable: $ => choice(
|
||||
$.symbol,
|
||||
$.dotted_identifier,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue