#[repr(u16)]pub enum SyntaxKind {
Show 38 variants
TEXT = 0,
WHITESPACE = 1,
ECHO_OPEN = 2,
ECHO_CLOSE = 3,
RAW_ECHO_OPEN = 4,
RAW_ECHO_CLOSE = 5,
PHP = 6,
COMMENT = 7,
ESCAPED = 8,
DIRECTIVE_NAME = 9,
DIRECTIVE_ARGS = 10,
PHP_OPEN = 11,
PHP_CLOSE = 12,
TAG_OPEN = 13,
END_TAG_OPEN = 14,
TAG_NAME = 15,
TAG_CLOSE = 16,
TAG_SELF_CLOSE = 17,
ATTR_NAME = 18,
EQ = 19,
QUOTE = 20,
HTML_COMMENT_OPEN = 21,
HTML_COMMENT_CLOSE = 22,
DOCTYPE = 23,
ROOT = 24,
ECHO = 25,
RAW_ECHO = 26,
DIRECTIVE = 27,
BLOCK = 28,
BODY = 29,
VERBATIM = 30,
PHP_BLOCK = 31,
PHP_TAG = 32,
TAG = 33,
END_TAG = 34,
ATTRIBUTE = 35,
ATTR_VALUE = 36,
ERROR = 37,
}Expand description
Token kinds come first, then node kinds. The u16 value is what rowan stores.
Variants§
TEXT = 0
Anything Blade doesn’t treat specially (HTML, CSS, JS, plain text).
WHITESPACE = 1
Spaces or tabs between a directive name and its arguments, or any run of whitespace inside an HTML tag.
ECHO_OPEN = 2
{{
ECHO_CLOSE = 3
}}
RAW_ECHO_OPEN = 4
{!!
RAW_ECHO_CLOSE = 5
!!}
PHP = 6
Embedded PHP, kept opaque: echo contents, @php bodies, <?php ?> bodies.
COMMENT = 7
A whole Blade comment, {{-- ... --}}.
ESCAPED = 8
Output Blade prints literally: @{{ ... }}, @{!! ... !!}, @@name.
DIRECTIVE_NAME = 9
A directive name including its @, e.g. @if.
DIRECTIVE_ARGS = 10
Directive arguments including the parentheses, e.g. ($user).
PHP_OPEN = 11
<?php or <?=
PHP_CLOSE = 12
?>
TAG_OPEN = 13
< starting a start tag.
END_TAG_OPEN = 14
</ starting an end tag.
TAG_NAME = 15
A tag name, e.g. div, x-slot:title, livewire:counter.
TAG_CLOSE = 16
> ending a tag.
TAG_SELF_CLOSE = 17
/> ending a self-closing tag.
ATTR_NAME = 18
An attribute name, e.g. class, :value, wire:model.live, @click.
EQ = 19
= between an attribute name and its value.
QUOTE = 20
" or ' around an attribute value.
HTML_COMMENT_OPEN = 21
<!--
HTML_COMMENT_CLOSE = 22
-->
DOCTYPE = 23
A whole <!DOCTYPE ...>.
ROOT = 24
ECHO = 25
RAW_ECHO = 26
DIRECTIVE = 27
BLOCK = 28
BODY = 29
VERBATIM = 30
PHP_BLOCK = 31
PHP_TAG = 32
TAG = 33
A start tag, <div class="a"> or <br/>. Not a whole element: Blade
directives may open and close elements in different branches.
END_TAG = 34
An end tag, </div>.
ATTRIBUTE = 35
name, name=value or name="value" inside a tag.
ATTR_VALUE = 36
An attribute value, with its quotes if it has them.