diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2011-08-09 20:54:54 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2011-08-09 21:03:54 +0200 |
commit | dbeb4fa06b6813671b5e30cb9fa822046980e9d0 (patch) | |
tree | 49ee312b60f3c34b484d09a224ba3e0ae7a69d52 | |
parent | 405d74a46ff4d337f365ce038dab19f9e5aac1b1 (diff) | |
download | fpGUI-dbeb4fa06b6813671b5e30cb9fa822046980e9d0.tar.xz |
ide: syntax highlighting improvements by adding reserved keywords to regex
- Also improved correct highlighting by using word boundaries in regex.
-rw-r--r-- | examples/apps/ide/src/frm_main.pas | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/examples/apps/ide/src/frm_main.pas b/examples/apps/ide/src/frm_main.pas index 43bf2322..329a1014 100644 --- a/examples/apps/ide/src/frm_main.pas +++ b/examples/apps/ide/src/frm_main.pas @@ -141,10 +141,12 @@ const cProjectFiles = '*.project'; { nicely working so far } - cKeywords = '\s*(begin|end|read|write|try|finally|except|uses|interface' - + '|implementation|procedure|function|constructor|destructor|property' - + '|private|public|published|type|class|unit|program|if|then|for|downto|to' - + '|do|else|while|and|inherited|const|var|initialization|finalization)[^0-9a-zA-Z:=;\)\( ]*'; + cKeywords = '\b(begin|end|read|write|with|try|finally|except|uses|interface' + + '|implementation|procedure|function|constructor|destructor|property|operator' + + '|private|protected|public|published|type|virtual|abstract|overload' + + '|override|class|unit|program|set|of|if|then|for|downto|to|as|div|mod' + + '|do|else|while|and|inherited|const|var|initialization|finalization' + + '|on|or|in|raise|not|case|record|array|out|resourcestring|default)\b'; //[^0-9a-zA-Z:=;\)\( ]*'; cComments1 = '(\s*\/\/.*$)|(\s*\{.*\})'; |