implement meta token replacement
This commit is contained in:
@@ -11,6 +11,7 @@ comments = ["^--.*", ""]
|
||||
with = ["^#with ([\\w./]+)", "cat $1"]
|
||||
date = ["#date_now", "date"]
|
||||
user = ["#user", "user"]
|
||||
test = ["#test", "cat ./mathlib.mlc"]
|
||||
|
||||
# Describes tokens to be replaced by identifiers and then later swapped back in after the tokenizer.
|
||||
# All special tokens are treated as constants
|
||||
@@ -28,7 +29,7 @@ operands = [":=", "->", "<=", ">=", "<", ">", "!", "+", "-", "/", "*", "(", ")",
|
||||
terminator = [";"]
|
||||
|
||||
[semantics]
|
||||
keywords = ["if", "then", "else", "end", "with"]
|
||||
keywords = ["if", "then", "else", "end"]
|
||||
|
||||
[constants]
|
||||
number = "(?:0b[01]+|0x[0-9a-fA-F]+|0[0-7]+|[1-9][0-9]*)"
|
||||
|
||||
Reference in New Issue
Block a user