Skip to content

Commit

Permalink
Smalltalk: Use standard char token (#3255)
Browse files Browse the repository at this point in the history
  • Loading branch information
RunDevelopment committed Dec 10, 2021
1 parent 58a65bf commit a7bb300
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 35 deletions.
14 changes: 10 additions & 4 deletions components/prism-smalltalk.js
@@ -1,10 +1,16 @@
Prism.languages.smalltalk = {
'comment': /"(?:""|[^"])*"/,
'character': {
'comment': {
pattern: /"(?:""|[^"])*"/,
greedy: true
},
'char': {
pattern: /\$./,
alias: 'string'
greedy: true
},
'string': {
pattern: /'(?:''|[^'])*'/,
greedy: true
},
'string': /'(?:''|[^'])*'/,
'symbol': /#[\da-z]+|#(?:-|([+\/\\*~<>=@%|&?!])\1?)|#(?=\()/i,
'block-arguments': {
pattern: /(\[\s*):[^\[|]*\|/,
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.

@@ -1,17 +1,17 @@
$a
$4
$.
$^
----------------------------------------------------
[
["character", "$a"],
["character", "$4"],
["character", "$."],
["character", "$^"]
]
----------------------------------------------------
Checks for characters.
$a
$4
$.
$^

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

[
["char", "$a"],
["char", "$4"],
["char", "$."],
["char", "$^"]
]

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

Checks for characters.
@@ -1,13 +1,13 @@
$'
'foobar'
----------------------------------------------------
[
["character", "$'"],
["string", "'foobar'"]
]
----------------------------------------------------
Checks a single-quote-character doesn't confuse string parsing.
$'
'foobar'

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

[
["char", "$'"],
["string", "'foobar'"]
]

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

Checks a single-quote-character doesn't confuse string parsing.

0 comments on commit a7bb300

Please sign in to comment.