-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🩹 Correct embedded recipe block body end check (#69)
fix: correct embedded end check
- Loading branch information
Showing
5 changed files
with
141 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,29 @@ | ||
# Embedded languages | ||
|
||
# TODO: how to test embedded grammars in snapshots? | ||
|
||
python: | ||
#!/usr/bin/env python3 | ||
print('Hello from python!') | ||
#!/usr/bin/env python3 | ||
print('Hello from python!') | ||
js: | ||
#!/usr/bin/env node | ||
console.log('Greetings from JavaScript!') | ||
#!/usr/bin/env node | ||
console.log('Greetings from JavaScript!') | ||
perl: | ||
#!/usr/bin/env perl | ||
print "Larry Wall says Hi!\n"; | ||
#!/usr/bin/env perl | ||
print "Larry Wall says Hi!\n"; | ||
sh: | ||
#!/usr/bin/env sh | ||
hello='Yo' | ||
echo "$hello from a shell script!" | ||
#!/usr/bin/env sh | ||
hello='Yo' | ||
echo "$hello from a shell script!" | ||
ruby: | ||
#!/usr/bin/env ruby | ||
puts "Hello from ruby!" | ||
#!/usr/bin/env ruby | ||
puts "Hello from ruby!" | ||
empty-lines: | ||
#!/usr/bin/env python3 | ||
print('Hello from python!') | ||
print('Hello from python!') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,106 +1,134 @@ | ||
># Embedded languages | ||
#^^^^^^^^^^^^^^^^^^^^ source.just comment.line.number-sign.just | ||
> | ||
># TODO: how to test embedded grammars in snapshots? | ||
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.just comment.line.number-sign.just | ||
> | ||
>python: | ||
#^^^^^^ source.just entity.name.function.just | ||
# ^ source.just keyword.operator.recipe.end.just | ||
> #!/usr/bin/env python3 | ||
#^^^^ source.just | ||
# ^ source.just keyword.operator.path-join.just | ||
# ^^^ source.just | ||
# ^ source.just keyword.operator.path-join.just | ||
# ^^^ source.just | ||
# ^ source.just keyword.operator.path-join.just | ||
# ^^^ source.just support.function.builtin.just | ||
# ^^^^^^^^^ source.just | ||
> print('Hello from python!') | ||
#^^^^^^^ source.just | ||
# ^ source.just | ||
# ^ source.just string.quoted.single.just string.quoted.single.just | ||
# ^^^^^^^^^^^^^^^^^^ source.just string.quoted.single.just | ||
# ^ source.just string.quoted.single.just | ||
# ^ source.just | ||
> #!/usr/bin/env python3 | ||
#^^^^^^ source.just | ||
# ^ source.just keyword.operator.path-join.just | ||
# ^^^ source.just | ||
# ^ source.just keyword.operator.path-join.just | ||
# ^^^ source.just | ||
# ^ source.just keyword.operator.path-join.just | ||
# ^^^ source.just support.function.builtin.just | ||
# ^^^^^^^^^ source.just | ||
> print('Hello from python!') | ||
#^^^^^^^^^ source.just | ||
# ^ source.just | ||
# ^ source.just string.quoted.single.just string.quoted.single.just | ||
# ^^^^^^^^^^^^^^^^^^ source.just string.quoted.single.just | ||
# ^ source.just string.quoted.single.just | ||
# ^ source.just | ||
> | ||
>js: | ||
#^^ source.just entity.name.function.just | ||
# ^ source.just keyword.operator.recipe.end.just | ||
> #!/usr/bin/env node | ||
#^^^^ source.just | ||
# ^ source.just keyword.operator.path-join.just | ||
# ^^^ source.just | ||
# ^ source.just keyword.operator.path-join.just | ||
# ^^^ source.just | ||
# ^ source.just keyword.operator.path-join.just | ||
# ^^^ source.just support.function.builtin.just | ||
# ^^^^^^ source.just | ||
> console.log('Greetings from JavaScript!') | ||
#^^^^^^^^^^^^^ source.just | ||
# ^ source.just | ||
# ^ source.just string.quoted.single.just string.quoted.single.just | ||
# ^^^^^^^^^^^^^^^^^^^^^^^^^^ source.just string.quoted.single.just | ||
# ^ source.just string.quoted.single.just | ||
# ^ source.just | ||
> #!/usr/bin/env node | ||
#^^^^^^ source.just | ||
# ^ source.just keyword.operator.path-join.just | ||
# ^^^ source.just | ||
# ^ source.just keyword.operator.path-join.just | ||
# ^^^ source.just | ||
# ^ source.just keyword.operator.path-join.just | ||
# ^^^ source.just support.function.builtin.just | ||
# ^^^^^^ source.just | ||
> console.log('Greetings from JavaScript!') | ||
#^^^^^^^^^^^^^^^ source.just | ||
# ^ source.just | ||
# ^ source.just string.quoted.single.just string.quoted.single.just | ||
# ^^^^^^^^^^^^^^^^^^^^^^^^^^ source.just string.quoted.single.just | ||
# ^ source.just string.quoted.single.just | ||
# ^ source.just | ||
> | ||
>perl: | ||
#^^^^ source.just entity.name.function.just | ||
# ^ source.just keyword.operator.recipe.end.just | ||
> #!/usr/bin/env perl | ||
#^^^^ source.just | ||
# ^ source.just keyword.operator.path-join.just | ||
# ^^^ source.just | ||
# ^ source.just keyword.operator.path-join.just | ||
# ^^^ source.just | ||
# ^ source.just keyword.operator.path-join.just | ||
# ^^^ source.just support.function.builtin.just | ||
# ^^^^^^ source.just | ||
> print "Larry Wall says Hi!\n"; | ||
#^^^^^^^^ source.just | ||
# ^ source.just string.quoted.double.just string.quoted.double.just | ||
# ^^^^^^^^^^^^^^^^^^^ source.just string.quoted.double.just | ||
# ^^ source.just string.quoted.double.just constant.character.escape.just | ||
# ^ source.just string.quoted.double.just | ||
# ^^ source.just | ||
> #!/usr/bin/env perl | ||
#^^^^^^ source.just | ||
# ^ source.just keyword.operator.path-join.just | ||
# ^^^ source.just | ||
# ^ source.just keyword.operator.path-join.just | ||
# ^^^ source.just | ||
# ^ source.just keyword.operator.path-join.just | ||
# ^^^ source.just support.function.builtin.just | ||
# ^^^^^^ source.just | ||
> print "Larry Wall says Hi!\n"; | ||
#^^^^^^^^^^ source.just | ||
# ^ source.just string.quoted.double.just string.quoted.double.just | ||
# ^^^^^^^^^^^^^^^^^^^ source.just string.quoted.double.just | ||
# ^^ source.just string.quoted.double.just constant.character.escape.just | ||
# ^ source.just string.quoted.double.just | ||
# ^^ source.just | ||
> | ||
>sh: | ||
#^^ source.just entity.name.function.just | ||
# ^ source.just keyword.operator.recipe.end.just | ||
> #!/usr/bin/env sh | ||
#^^^^ source.just | ||
# ^ source.just keyword.operator.path-join.just | ||
# ^^^ source.just | ||
# ^ source.just keyword.operator.path-join.just | ||
# ^^^ source.just | ||
# ^ source.just keyword.operator.path-join.just | ||
# ^^^ source.just support.function.builtin.just | ||
# ^^^^ source.just | ||
> hello='Yo' | ||
#^^^^^^^^ source.just | ||
# ^ source.just string.quoted.single.just string.quoted.single.just | ||
# ^^ source.just string.quoted.single.just | ||
# ^ source.just string.quoted.single.just | ||
> echo "$hello from a shell script!" | ||
#^^^^^^^ source.just | ||
# ^ source.just string.quoted.double.just string.quoted.double.just | ||
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.just string.quoted.double.just | ||
# ^ source.just string.quoted.double.just | ||
> #!/usr/bin/env sh | ||
#^^^^^^ source.just | ||
# ^ source.just keyword.operator.path-join.just | ||
# ^^^ source.just | ||
# ^ source.just keyword.operator.path-join.just | ||
# ^^^ source.just | ||
# ^ source.just keyword.operator.path-join.just | ||
# ^^^ source.just support.function.builtin.just | ||
# ^^^^ source.just | ||
> hello='Yo' | ||
#^^^^^^^^^^ source.just | ||
# ^ source.just string.quoted.single.just string.quoted.single.just | ||
# ^^ source.just string.quoted.single.just | ||
# ^ source.just string.quoted.single.just | ||
> echo "$hello from a shell script!" | ||
#^^^^^^^^^ source.just | ||
# ^ source.just string.quoted.double.just string.quoted.double.just | ||
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.just string.quoted.double.just | ||
# ^ source.just string.quoted.double.just | ||
> | ||
>ruby: | ||
#^^^^ source.just entity.name.function.just | ||
# ^ source.just keyword.operator.recipe.end.just | ||
> #!/usr/bin/env ruby | ||
#^^^^ source.just | ||
# ^ source.just keyword.operator.path-join.just | ||
# ^^^ source.just | ||
# ^ source.just keyword.operator.path-join.just | ||
# ^^^ source.just | ||
# ^ source.just keyword.operator.path-join.just | ||
# ^^^ source.just support.function.builtin.just | ||
# ^^^^^^ source.just | ||
> puts "Hello from ruby!" | ||
#^^^^^^^ source.just | ||
# ^ source.just string.quoted.double.just string.quoted.double.just | ||
# ^^^^^^^^^^^^^^^^ source.just string.quoted.double.just | ||
# ^ source.just string.quoted.double.just | ||
> #!/usr/bin/env ruby | ||
#^^^^^^ source.just | ||
# ^ source.just keyword.operator.path-join.just | ||
# ^^^ source.just | ||
# ^ source.just keyword.operator.path-join.just | ||
# ^^^ source.just | ||
# ^ source.just keyword.operator.path-join.just | ||
# ^^^ source.just support.function.builtin.just | ||
# ^^^^^^ source.just | ||
> puts "Hello from ruby!" | ||
#^^^^^^^^^ source.just | ||
# ^ source.just string.quoted.double.just string.quoted.double.just | ||
# ^^^^^^^^^^^^^^^^ source.just string.quoted.double.just | ||
# ^ source.just string.quoted.double.just | ||
> | ||
>empty-lines: | ||
#^^^^^^^^^^^ source.just entity.name.function.just | ||
# ^ source.just keyword.operator.recipe.end.just | ||
> #!/usr/bin/env python3 | ||
#^^^^^^ source.just | ||
# ^ source.just keyword.operator.path-join.just | ||
# ^^^ source.just | ||
# ^ source.just keyword.operator.path-join.just | ||
# ^^^ source.just | ||
# ^ source.just keyword.operator.path-join.just | ||
# ^^^ source.just support.function.builtin.just | ||
# ^^^^^^^^^ source.just | ||
> print('Hello from python!') | ||
#^^^^^^^^^ source.just | ||
# ^ source.just | ||
# ^ source.just string.quoted.single.just string.quoted.single.just | ||
# ^^^^^^^^^^^^^^^^^^ source.just string.quoted.single.just | ||
# ^ source.just string.quoted.single.just | ||
# ^ source.just | ||
> | ||
> print('Hello from python!') | ||
#^^^^^^^^^ source.just | ||
# ^ source.just | ||
# ^ source.just string.quoted.single.just string.quoted.single.just | ||
# ^^^^^^^^^^^^^^^^^^ source.just string.quoted.single.just | ||
# ^ source.just string.quoted.single.just | ||
# ^ source.just | ||
> |