@@ -93,14 +93,14 @@ export const ATTRIBUTE: StateDefinition<AttrMeta> = {
9393 if ( code === CODE . COLON ) {
9494 ensureAttrName ( this , attr ) ;
9595 attr . bound = true ;
96- this . skip ( 2 ) ; // skip :=
96+ this . pos += 2 ; // skip :=
9797 this . consumeWhitespace ( ) ;
9898 } else if ( code === CODE . PERIOD ) {
9999 attr . spread = true ;
100- this . skip ( 3 ) ; // skip ...
100+ this . pos += 3 ; // skip ...
101101 } else {
102102 ensureAttrName ( this , attr ) ;
103- this . skip ( 1 ) ; // skip =
103+ this . pos ++ ; // skip =
104104 this . consumeWhitespace ( ) ;
105105 }
106106
@@ -111,21 +111,21 @@ export const ATTRIBUTE: StateDefinition<AttrMeta> = {
111111 ? CONCISE_VALUE_TERMINATORS
112112 : HTML_VALUE_TERMINATORS ;
113113
114- this . rewind ( 1 ) ;
114+ this . pos -- ;
115115 } else if ( code === CODE . OPEN_PAREN ) {
116116 ensureAttrName ( this , attr ) ;
117117 attr . stage = ATTR_STAGE . ARGUMENT ;
118- this . skip ( 1 ) ; // skip (
118+ this . pos ++ ; // skip (
119119 this . enterState ( STATE . EXPRESSION ) . terminator = CODE . CLOSE_PAREN ;
120- this . rewind ( 1 ) ;
120+ this . pos -- ;
121121 } else if ( code === CODE . OPEN_CURLY_BRACE && attr . args ) {
122122 ensureAttrName ( this , attr ) ;
123123 attr . stage = ATTR_STAGE . BLOCK ;
124- this . skip ( 1 ) ; // skip {
124+ this . pos ++ ; // skip {
125125 const expr = this . enterState ( STATE . EXPRESSION ) ;
126126 expr . terminatedByWhitespace = false ;
127127 expr . terminator = CODE . CLOSE_CURLY_BRACE ;
128- this . rewind ( 1 ) ;
128+ this . pos -- ;
129129 } else if ( attr . stage === ATTR_STAGE . UNKNOWN ) {
130130 attr . stage = ATTR_STAGE . NAME ;
131131 const expr = this . enterState ( STATE . EXPRESSION ) ;
@@ -134,7 +134,7 @@ export const ATTRIBUTE: StateDefinition<AttrMeta> = {
134134 expr . terminator = this . isConcise
135135 ? CONCISE_NAME_TERMINATORS
136136 : HTML_NAME_TERMINATORS ;
137- this . rewind ( 1 ) ;
137+ this . pos -- ;
138138 } else {
139139 this . exitState ( ) ;
140140 }
@@ -184,7 +184,7 @@ export const ATTRIBUTE: StateDefinition<AttrMeta> = {
184184 }
185185
186186 const start = child . start - 1 ; // include (
187- const end = this . skip ( 1 ) ; // include )
187+ const end = ++ this . pos ; // include )
188188 const value = {
189189 start : child . start ,
190190 end : child . end ,
@@ -210,7 +210,7 @@ export const ATTRIBUTE: StateDefinition<AttrMeta> = {
210210 case ATTR_STAGE . BLOCK : {
211211 const params = attr . args as Ranges . Value ;
212212 const start = params . start ;
213- const end = this . skip ( 1 ) ; // include }
213+ const end = ++ this . pos ; // include }
214214 this . handlers . onAttrMethod ?.( {
215215 start,
216216 end,
0 commit comments