This repository was archived by the owner on Sep 11, 2023. It is now read-only.
File tree 1 file changed +2
-30
lines changed
1 file changed +2
-30
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ public static SPToken[] Tokenize(string source)
43
43
44
44
#region Quotes
45
45
46
- if ( c == '"' )
46
+ if ( c == '"' || c == ' \' ' )
47
47
{
48
48
var startIndex = i ;
49
49
var foundOccurence = false ;
@@ -52,7 +52,7 @@ public static SPToken[] Tokenize(string source)
52
52
for ( var j = i + 1 ; j < length ; ++ j )
53
53
{
54
54
// if found, search for an escape slash before it
55
- if ( buffer [ j ] == '"' )
55
+ if ( buffer [ j ] == c )
56
56
{
57
57
if ( buffer [ j - 1 ] == '\\ ' )
58
58
{
@@ -112,34 +112,6 @@ public static SPToken[] Tokenize(string source)
112
112
continue ;
113
113
}
114
114
115
- if ( c == '\' ' ) //I sell that as a quote...kill me right?
116
- {
117
- var startIndex = i ;
118
- var foundOccurence = false ;
119
- for ( var j = i + 1 ; j < length ; ++ j )
120
- {
121
- if ( buffer [ j ] == '\' ' )
122
- {
123
- if ( buffer [ j - 1 ] != '\\ ' ) //is the quote not escaped?
124
- {
125
- token . Add ( new SPToken ( )
126
- {
127
- Kind = SPTokenKind . Quote ,
128
- Value = source . Substring ( startIndex , j - startIndex + 1 )
129
- } ) ;
130
- foundOccurence = true ;
131
- i = j ;
132
- break ;
133
- }
134
- }
135
- }
136
-
137
- if ( foundOccurence )
138
- {
139
- continue ;
140
- }
141
- }
142
-
143
115
#endregion
144
116
145
117
#region Comments
You can’t perform that action at this time.
0 commit comments