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/src/parse/state/fragment.ts

17 lines
295 B

import tag from './tag';
import mustache from './mustache';
import text from './text';
import { Parser } from '../index';
export default function fragment ( parser: Parser ) {
if ( parser.match( '<' ) ) {
return tag;
}
if ( parser.match( '{{' ) ) {
return mustache;
}
return text;
}