This repository was archived by the owner on Sep 11, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +2
-30
lines changed
Expand file tree Collapse file tree 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)
4343
4444 #region Quotes
4545
46- if ( c == '"' )
46+ if ( c == '"' || c == ' \' ' )
4747 {
4848 var startIndex = i ;
4949 var foundOccurence = false ;
@@ -52,7 +52,7 @@ public static SPToken[] Tokenize(string source)
5252 for ( var j = i + 1 ; j < length ; ++ j )
5353 {
5454 // if found, search for an escape slash before it
55- if ( buffer [ j ] == '"' )
55+ if ( buffer [ j ] == c )
5656 {
5757 if ( buffer [ j - 1 ] == '\\ ' )
5858 {
@@ -112,34 +112,6 @@ public static SPToken[] Tokenize(string source)
112112 continue ;
113113 }
114114
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-
143115 #endregion
144116
145117 #region Comments
You can’t perform that action at this time.
0 commit comments