To customize you should extract tokens with regular expression. Then you should create the template of original language with token you extracted.
Token Extraction
Syntax
typeofsynax:regex:regex (regex for token1) <var1> regextokens:[token1,token2,token3]unmatch:-regexglobal:Trueonce:Truenext:[other_typeofsyntax,$collection_name]token1:unmatch:-regexeachline:extra_here <line> extra_herereplace:-[regex,"replacewith"]-["regex here"]call:[other_typeofsyntax,$collection_name]_1typeofsyntax:regex:regex2tokens:[token1,token2,token3]#Code here(like above)#...................#...................#...................settings:collections:collection_name:[typeofsyntax1,typeofsyntax2]varfile:filename_without_extensionvariables:var1:regex1var2:regex2var3:regex3after:#Command Line Commandserrfile:# Base Name #after: #- Command One #- Command Two #after: # windows: Command # linux: Command
typeofsyntax
Name of syntax you wanted to match
Eg. arithmetic, loop etc.
If one type have same pattern but different regular expression to match.
You can write _<any character><typeofsyntax> for next regex.
Eg. _1typeofsyntax
Both regex use one template
regex
Place where regular expression to match block of code..
Regular expression for tokens must be inside brackets.
~ acts like s*in regular expression
tokens
Name of tokens you wanted to extract
unmatch
List of regex that should not be matched. It can be used in token option also
global
If it is False it works only after calling it otherwise it works normally.
once
If it is True it works only once
next
To pass converted syntax into another or same typeofsyntax
token1
To modify token1 matched
To add content in each line.
<line> represents original content in eachline. It loops through every line.
Regular expression to match and replace or delete any unwanted content in token.
To replace add a list with first item as regular expression to unwanted content and second item is the content you wanted to replace with.
To delete add a list with regular expression only
To pass transformed to another typeofsyntax
Write names of typeofsyntax inside array to call.
Passes from left to right
settings block
For setting variables, collections, after command
You can make variables than can used inside regular expression by <varname>
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
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