File tree Expand file tree Collapse file tree 4 files changed +39012
-38280
lines changed
Expand file tree Collapse file tree 4 files changed +39012
-38280
lines changed Original file line number Diff line number Diff line change @@ -351,6 +351,30 @@ class A {
351351 (identifier)
352352 (type_identifier)))))
353353
354+ =======================================
355+ $ in identifier names
356+ =======================================
357+
358+ class $A$B$ {
359+ val b$, c$ : Int
360+ val d$ : String
361+ }
362+
363+ ---
364+
365+ (compilation_unit
366+ (class_definition
367+ (identifier)
368+ (template_body
369+ (val_declaration
370+ (identifier)
371+ (identifier)
372+ (type_identifier))
373+ (val_declaration
374+ (identifier)
375+ (type_identifier)))))
376+
377+
354378=======================================
355379Value declarations (Scala 3 syntax)
356380=======================================
Original file line number Diff line number Diff line change @@ -778,7 +778,7 @@ module.exports = grammar({
778778 ) ,
779779
780780 // TODO: Include operators.
781- _plainid : $ => / [ a - z A - Z _ ] \w * / ,
781+ _plainid : $ => / [ a - z A - Z _ \\ $ ] [ \w \\ $ ] * / ,
782782 _backquoted_id : $ => / ` [ ^ \n ` ] + ` / ,
783783 identifier : $ => choice (
784784 $ . _plainid ,
Original file line number Diff line number Diff line change 39583958 },
39593959 "_plainid" : {
39603960 "type" : " PATTERN" ,
3961- "value" : " [a-zA-Z_] \\ w*"
3961+ "value" : " [a-zA-Z_\\\\ $][ \\ w\\\\ $] *"
39623962 },
39633963 "_backquoted_id" : {
39643964 "type" : " PATTERN" ,
You can’t perform that action at this time.
0 commit comments