Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
this allows #language -injected grammars to return sequences that further declare macros, etc. otherwise it ends up being under one big sequence, which is compiled all at once.
- Loading branch information
Showing
5 changed files
with
51 additions
and
5 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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
require("atomy/bootstrap") | ||
require("atomy/grammar") | ||
|
||
eval(" | ||
class Parser | ||
def initialize(str) | ||
@str = str | ||
end | ||
|
||
def external_invoke(other, rule, *args) | ||
other.result = Atomy::Grammar::AST::Sequence.new([ | ||
Atomy::Bootstrap.macro_definer( | ||
Atomy::Grammar::AST::Quote.new(Atomy::Grammar::AST::Number.new(42)), | ||
Atomy::Grammar::AST::Quote.new(Atomy::Grammar::AST::StringLiteral.new(\"forty-two\")), | ||
), | ||
Atomy::Grammar::AST::Number.new(42), | ||
]) | ||
end | ||
end | ||
") |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
#language codeloader |