File tree Expand file tree Collapse file tree 1 file changed +7
-20
lines changed Expand file tree Collapse file tree 1 file changed +7
-20
lines changed Original file line number Diff line number Diff line change 1111
1212
1313//Definitions
14- // comment -- text withing * ; or /* */
14+ // comment -- text within * ; or /* */
1515// keyword -- SAS language variable
1616// variable -- macro variables starts with '&' or variable formats
1717// variable-2 -- DATA Step, proc, or macro names
116116 return "comment" ;
117117 }
118118
119+ if ( ch == "*" && stream . column ( ) == stream . indentation ( ) ) {
120+ stream . skipToEnd ( )
121+ return "comment"
122+ }
123+
119124 // DoubleOperator match
120125 var doubleOperator = ch + stream . peek ( ) ;
121126
122- // Match all line comments.
123- var myString = stream . string ;
124- var myRegexp = / (?: ^ \s * | [ ; ] \s * ) ( \* .* ?) ; / ig;
125- var match = myRegexp . exec ( myString ) ;
126- if ( match !== null ) {
127- if ( match . index === 0 && ( stream . column ( ) !== ( match . index + match [ 0 ] . length - 1 ) ) ) {
128- stream . backUp ( stream . column ( ) ) ;
129- stream . skipTo ( ';' ) ;
130- stream . next ( ) ;
131- return 'comment' ;
132- } else if ( match . index + 1 < stream . column ( ) && stream . column ( ) < match . index + match [ 0 ] . length - 1 ) {
133- // the ';' triggers the match so move one past it to start
134- // the comment block that is why match.index+1
135- stream . backUp ( stream . column ( ) - match . index - 1 ) ;
136- stream . skipTo ( ';' ) ;
137- stream . next ( ) ;
138- return 'comment' ;
139- }
140- } else if ( ( ch === '"' || ch === "'" ) && ! state . continueString ) {
127+ if ( ( ch === '"' || ch === "'" ) && ! state . continueString ) {
141128 state . continueString = ch
142129 return "string"
143130 } else if ( state . continueString ) {
You can’t perform that action at this time.
0 commit comments