You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/compiler/parse/state/text.js

19 lines
306 B

8 years ago
export default function text ( parser ) {
const start = parser.index;
let data = '';
while ( !parser.match( '<' ) && !parser.match( '{{' ) ) {
data += parser.template[ parser.index++ ];
}
parser.current().children.push({
start,
end: parser.index,
type: 'Text',
data
});
return null;
}