Skip to content

Commit

Permalink
BBj: add declare as keyword
Browse files Browse the repository at this point in the history
  • Loading branch information
hyyan committed Jul 30, 2022
1 parent f069d10 commit 358f56f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion components/prism-bbj.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
greedy: true
},
'number': /(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,
'keyword': /\b(?:abstract|all|argc|begin|bye|callback|case|chn|class|classend|ctl|day|delete|dim|dom|dread|dsz|else|end|endif|err|exitto|extends|fi|field|for|from|gosub|goto|if|implements|interface|interfaceend|iol|iolist|let|list|load|method|methodend|methodret|on|opts|pfx|print|private|process_events|protected|psz|public|read|read_resource|release|remove_callback|repeat|restore|return|rev|seterr|setesc|sqlchn|sqlunt|ssn|start|static|swend|switch|sys|then|tim|unt|until|use|void|wend|where|while)\b/i,
'keyword': /\b(?:abstract|all|argc|begin|bye|callback|case|chn|class|classend|ctl|day|declare|delete|dim|dom|dread|dsz|else|end|endif|err|exitto|extends|fi|field|for|from|gosub|goto|if|implements|interface|interfaceend|iol|iolist|let|list|load|method|methodend|methodret|on|opts|pfx|print|private|process_events|protected|psz|public|read|read_resource|release|remove_callback|repeat|restore|return|rev|seterr|setesc|sqlchn|sqlunt|ssn|start|static|swend|switch|sys|then|tim|unt|until|use|void|wend|where|while)\b/i,
'function': /\b\w+(?=\()/,
'boolean': /\b(?:BBjAPI\.TRUE|BBjAPI\.FALSE)\b/i,
'operator': /<[=>]?|>=?|[+\-*\/^=&]|\b(?:and|not|or|xor)\b/i,
Expand Down
2 changes: 1 addition & 1 deletion components/prism-bbj.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions tests/languages/bbj/keyword_feature.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ dread dsz else end endif err exitto extends fi field for from gosub goto if impl
interface interfaceend iol iolist let list load method methodend methodret on opts pfx
print private process_events protected psz public read read_resource release remove_callback
repeat restore return rev seterr setesc sqlchn sqlunt ssn start static swend switch sys then
tim unt until use void wend where while
tim unt until use void wend where while declare

----------------------------------------------------

Expand Down Expand Up @@ -89,7 +89,8 @@ tim unt until use void wend where while
["keyword", "void"],
["keyword", "wend"],
["keyword", "where"],
["keyword", "while"]
["keyword", "while"],
["keyword", "declare"]
]

----------------------------------------------------
Expand Down

0 comments on commit 358f56f

Please sign in to comment.