X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=tools%2Finform.py;h=73b0d0d76e580351645e2752e15a05fae61aa9b4;hb=2a223f38ada318aa468e46210b7f92941816100e;hp=94b4b03b4dd566ba5040e315c159c0b2907016d7;hpb=f0b3c1de40eb2b2f228e43e99bf0535b1c2ea5da;p=ibg.git diff --git a/tools/inform.py b/tools/inform.py index 94b4b03..73b0d0d 100644 --- a/tools/inform.py +++ b/tools/inform.py @@ -44,7 +44,9 @@ properties = ["n_to", "s_to", "e_to", "w_to", "ne_to", "se_to", "nw_to", "time_left", "time_out", "when_closed", "when_open", "when_on", "when_off", "with_key"] -keywords = ["box", "break", "continue", "do", "else", "font off", "font on", +extension_properties = ["pname"] + +keywords = ["box", "break", "continue", "do", "else", "font", "for", "give", "has", "hasnt", "if", "in", "inversion", "jump", "move", "new_line", "notin", "objectloop", "ofclass", "or", "print", "print_ret", "provides", "quit", "read", "remove", @@ -80,7 +82,7 @@ class InformLexer(RegexLexer): (r'\\', Text), (r'=', Operator), (r"[A-Za-z_,]+:", Name.Label), - (r"<<\S+>>", Name.Label), + (r"<.+?>", Name.Label), (wordlist(objects), Name.Class), (wordlist(keywords), Token.Keyword.Reserved), @@ -89,6 +91,8 @@ class InformLexer(RegexLexer): (wordlist(attributes), Name.Attribute), (wordlist(constants), Name.Constant), + (wordlist(extension_properties), Name.Builtin), + (r'[a-zA-Z_][a-zA-Z0-9_.]*', Name), (r'(\d+\.?\d*|\d*\.\d+)([eE][+-]?[0-9]+)?', Number.Float), (r'\d+', Number.Integer),