mirror of
https://github.com/apple/pkl.git
synced 2026-04-23 08:48:36 +02:00
Only allow shebangs in the beginning of a module (#1126)
This commit is contained in:
2
pkl-core/src/test/files/LanguageSnippetTests/input/errors/shebang.pkl
vendored
Normal file
2
pkl-core/src/test/files/LanguageSnippetTests/input/errors/shebang.pkl
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
foo = 1
|
||||
#!/usr/bin/env pkl eval
|
||||
2
pkl-core/src/test/files/LanguageSnippetTests/input/syntax/shebang.pkl
vendored
Normal file
2
pkl-core/src/test/files/LanguageSnippetTests/input/syntax/shebang.pkl
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env pkl eval
|
||||
foo = 1
|
||||
6
pkl-core/src/test/files/LanguageSnippetTests/output/errors/shebang.err
vendored
Normal file
6
pkl-core/src/test/files/LanguageSnippetTests/output/errors/shebang.err
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
–– Pkl Error ––
|
||||
Invalid token at position. Expected a class, typealias, method, or property.
|
||||
|
||||
x | #!/usr/bin/env pkl eval
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
at shebang (file:///$snippetsDir/input/errors/shebang.pkl)
|
||||
1
pkl-core/src/test/files/LanguageSnippetTests/output/syntax/shebang.pcf
vendored
Normal file
1
pkl-core/src/test/files/LanguageSnippetTests/output/syntax/shebang.pcf
vendored
Normal file
@@ -0,0 +1 @@
|
||||
foo = 1
|
||||
Reference in New Issue
Block a user