Skip to content

Commit 9b011a7

Browse files
committed
go to underscore
1 parent e24c570 commit 9b011a7

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

mcparser.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace microcode {
66
export function progToString(prog: ProgramDefn, ret: { s: string }) {
77
const ruleToString = (rule: RuleDefn) => {
88
const toToken = (tile: Tile) =>
9-
resolveTooltip("T" + getTid(tile)).replaceAll(" ", "-")
9+
resolveTooltip("T" + getTid(tile)).replaceAll(" ", "_")
1010
const tileToString = (tile: Tile) => {
1111
const tok = toToken(tile)
1212
if (tile instanceof ModifierEditor) {
@@ -39,7 +39,7 @@ namespace microcode {
3939
return res.join("\n")
4040
}
4141
const res = prog.pages.map(pageToString)
42-
ret.s = res.map((ps, i) => `page-${i + 1}\n${ps}`).join("\n")
42+
ret.s = res.map((ps, i) => `page_${i + 1}\n${ps}`).join("\n")
4343
}
4444

4545
enum Phase {
@@ -52,7 +52,7 @@ namespace microcode {
5252
//% shim=TD_NOOP
5353
export function parseProg(str: string, ret: { p: ProgramDefn }) {
5454
const token2tile = (tok: string) => {
55-
const tid = tooltip2tid(tok.replaceAll("-", " "))
55+
const tid = tooltip2tid(tok.replaceAll("_", " "))
5656
control.assert(tid != undefined, `tok ${tok} does not have mapping`)
5757
// check to see if field editor needed
5858
const tile = getEditor(tid)

0 commit comments

Comments
 (0)