(end)
| 294 | }, |
| 295 | |
| 296 | onattribnameend(end) { |
| 297 | const start = currentProp!.loc.start.offset |
| 298 | const name = getSlice(start, end) |
| 299 | if (currentProp!.type === NodeTypes.DIRECTIVE) { |
| 300 | currentProp!.rawName = name |
| 301 | } |
| 302 | // check duplicate attrs |
| 303 | if ( |
| 304 | currentOpenTag!.props.some( |
| 305 | p => (p.type === NodeTypes.DIRECTIVE ? p.rawName : p.name) === name, |
| 306 | ) |
| 307 | ) { |
| 308 | emitError(ErrorCodes.DUPLICATE_ATTRIBUTE, start) |
| 309 | } |
| 310 | }, |
| 311 | |
| 312 | onattribend(quote, end) { |
| 313 | if (currentOpenTag && currentProp) { |