-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
using tagged template literal over function call
- Loading branch information
1 parent
a1de3e3
commit 3c18a1a
Showing
5 changed files
with
79 additions
and
41 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
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,15 +1,15 @@ | ||
import { compile } from "./compile.js"; | ||
import { parse, tokenize } from "./parser.js"; | ||
import { museTag } from "./createMuse-tag.js"; | ||
// import { compile } from "./compile.js"; | ||
// import { parse, tokenize } from "./parser.js"; | ||
// import { museTag } from "./createMuse-tag.js"; | ||
|
||
const interpolated = museTag`;${() => ["a1", 2]} ^ 1` | ||
console.log("interpolated", interpolated); | ||
// const interpolated = museTag`;${() => ["a1", 2]} ^ 1` | ||
// console.log("interpolated", interpolated); | ||
|
||
const toks = tokenize("[a4 e4]<"); | ||
console.log("tokens:\n", toks) | ||
const [ ast, remainder ] = parse(toks); | ||
console.log("ast:\n", ast); | ||
console.log("remainder:\n", remainder); | ||
// const toks = tokenize("[a4 e4]<"); | ||
// console.log("tokens:\n", toks) | ||
// const [ ast, remainder ] = parse(toks); | ||
// console.log("ast:\n", ast); | ||
// console.log("remainder:\n", remainder); | ||
|
||
const result = compile(ast); | ||
console.log(result); | ||
// const result = compile(ast); | ||
// console.log(result); |