Skip to content

Commit

Permalink
Smalltalk: Added boolean token (#3100)
Browse files Browse the repository at this point in the history
  • Loading branch information
RunDevelopment committed Oct 5, 2021
1 parent 9fe2f93 commit 5138252
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
3 changes: 2 additions & 1 deletion components/prism-smalltalk.js
Expand Up @@ -21,7 +21,8 @@ Prism.languages.smalltalk = {
'punctuation': /\|/
}
},
'keyword': /\b(?:false|new|nil|self|super|true)\b/,
'keyword': /\b(?:new|nil|self|super)\b/,
'boolean': /\b(?:false|true)\b/,
'number': [
/\d+r-?[\dA-Z]+(?:\.[\dA-Z]+)?(?:e-?\d+)?/,
/\b\d+(?:\.\d+)?(?:e-?\d+)?/
Expand Down
2 changes: 1 addition & 1 deletion components/prism-smalltalk.min.js

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

8 changes: 8 additions & 0 deletions tests/languages/smalltalk/boolean_feature.test
@@ -0,0 +1,8 @@
true false

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

[
["boolean", "true"],
["boolean", "false"]
]
6 changes: 3 additions & 3 deletions tests/languages/smalltalk/keyword_feature.test
@@ -1,13 +1,13 @@
nil true false
nil
self super new

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

[
["keyword", "nil"], ["keyword", "true"], ["keyword", "false"],
["keyword", "nil"],
["keyword", "self"], ["keyword", "super"], ["keyword", "new"]
]

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

Checks for keywords.
Checks for keywords.

0 comments on commit 5138252

Please sign in to comment.