Write tokens inside template of original language(<tokename>)
Example
shorthand: (incf <var> <num>)
Linting
To match error with regular expression.
If error is matched, part of code with error and error message will be displayed.
Syntax
Syntax of error file
typeofsyntax: # typeofsyntax block
# Errors Block----------
NameofError:
#Error Details------
regex: Regex
msg: Error Message
help: Help Message
#-------------------
NameofError1:
#Error Details here
# ----------------------
# Outside Block---------
outside:
# Errors Block here
#-----------------------
typeofsyntax1:
#Errors Block here
#Outside Block here
# Outside Block here
typeofsyntax Block
Outside Block
To match error regex in whole source code.
For errors not related to any typeofsyntax, outside block should be used outside block
NameofError
Name of the error you want to match
Eg. TypeError, Syntax Error etc.
Regex
Regular expression to match error part of code
Error Message
Details of error
Help Message (optional)
Steps to resolve the error
Example
fstring:
Cannot_Quote:
regex: '{(?:(?!\}).)*"'
msg: "Can't use '\"' inside '{}'"
help: Asign constant to a variable and add that variable to fstring
Multiple_Curly:
regex: '{(?:(?!}).)*{'
msg: Cant't use nested curly brace
outside:
Invalid_Object:
regex: 'class <var>\((?:(?!\)).)*\n'
msg: No Multiline