-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add #error, #error function, #error macro
- Loading branch information
1 parent
fafecfa
commit f4ca4d3
Showing
3 changed files
with
27 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import typeBool from "../../../type/typeBool" | ||
import makeLiteralBool from "../../factory/makeLiteralBool" | ||
import type { ChiriMacroUse } from "../consumeMacroUseOptional" | ||
import MacroConstruct from "./MacroConstruct" | ||
|
||
export default MacroConstruct("error") | ||
.body("text") | ||
.parameter("function", typeBool.type, makeLiteralBool(false)) | ||
.parameter("macro", typeBool.type, makeLiteralBool(false)) | ||
.consume(({ reader, assignments, body, position }): ChiriMacroUse => ({ | ||
type: "macro-use", | ||
name: { type: "word", value: "error", position: { file: "internal", line: 0, column: 0 } }, | ||
assignments, | ||
content: body, | ||
position, | ||
})) |
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