inweb-bootstrap/Languages/ILDF.ildf

66 lines
1.4 KiB
Text
Raw Permalink Normal View History

Name: "ILDF"
Details: "The Inweb Language Definition File format"
Extension: ".ildf"
Whole Line Comment: "#"
2020-04-05 22:28:05 +00:00
2020-04-06 11:26:10 +00:00
String Literal: "\""
String Literal Escape: "\\"
2020-04-06 11:26:10 +00:00
# Regular expressions are handled here as if character literals
Character Literal: "/"
Character Literal Escape: "\\"
keyword "both"
keyword "brackets"
keyword "characters"
keyword "coloured"
keyword "colouring"
keyword "debug"
keyword "false"
keyword "in"
keyword "instances"
keyword "keyword"
keyword "matches"
keyword "matching"
keyword "not"
keyword "of"
keyword "on"
keyword "optionally"
keyword "prefix"
keyword "runs"
keyword "spaced"
keyword "suffix"
keyword "true"
keyword "unquoted" of !element
2020-04-05 22:28:05 +00:00
colouring {
runs of !identifier {
prefix "!" => !element on both
2020-04-06 11:26:10 +00:00
keyword of !element => !element
keyword of !reserved => !reserved
2020-04-06 11:26:10 +00:00
}
runs of unquoted {
instances of "=>" {
=> !reserved
}
instances of "{" {
=> !reserved
}
instances of "}" {
=> !reserved
}
2020-04-05 22:28:05 +00:00
}
characters {
# Anything left of these colours will be unquoted strings, so...
coloured !constant => !string
coloured !identifier => !string
# Regular expressions, now coloured !character, are more like functions
coloured !character => !function
}
# Detect Property: Value lines, not being fooled by a colon inside quotes
brackets in /\s*([A-Z][^"]*):.*/ {
# Uncolour only the bracketed part, i.e., the Property part
=> !plain
}
2020-04-05 22:28:05 +00:00
}