pub struct PhpLanguage {
pub tag_start: String,
pub tag_end: String,
pub short_tag_start: String,
pub echo_tag_start: String,
}Expand description
PHP language implementation.
This struct implements the Language trait for the PHP language.
Fields§
§tag_start: StringStart tag, e.g., “<?php”
tag_end: StringEnd tag, e.g., “?>”
short_tag_start: StringShort start tag, e.g., “<?”
echo_tag_start: StringEcho tag start, e.g., “<?=”
Implementations§
Source§impl PhpLanguage
impl PhpLanguage
Trait Implementations§
Source§impl<'config> Builder<PhpLanguage> for PhpBuilder<'config>
impl<'config> Builder<PhpLanguage> for PhpBuilder<'config>
Source§fn build<'a, S: Source + ?Sized>(
&self,
source: &S,
edits: &[TextEdit],
_cache: &'a mut impl BuilderCache<PhpLanguage>,
) -> BuildOutput<PhpLanguage>
fn build<'a, S: Source + ?Sized>( &self, source: &S, edits: &[TextEdit], _cache: &'a mut impl BuilderCache<PhpLanguage>, ) -> BuildOutput<PhpLanguage>
Builds the higher-level structure (typically an AST) from the source text. Read more
Source§impl Clone for PhpLanguage
impl Clone for PhpLanguage
Source§fn clone(&self) -> PhpLanguage
fn clone(&self) -> PhpLanguage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PhpLanguage
impl Debug for PhpLanguage
Source§impl Default for PhpLanguage
impl Default for PhpLanguage
Source§impl<'de> Deserialize<'de> for PhpLanguage
impl<'de> Deserialize<'de> for PhpLanguage
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for PhpLanguage
impl Hash for PhpLanguage
Source§impl HoverProvider<PhpLanguage> for PhpHoverProvider
Available on crate feature lsp only.
impl HoverProvider<PhpLanguage> for PhpHoverProvider
Available on crate feature
lsp only.Source§impl Language for PhpLanguage
impl Language for PhpLanguage
Source§const CATEGORY: LanguageCategory = LanguageCategory::Programming
const CATEGORY: LanguageCategory = LanguageCategory::Programming
The category of the language.
Source§type TokenType = PhpTokenType
type TokenType = PhpTokenType
The token type used to represent different token and node types in the language. Read more
Source§type ElementType = PhpElementType
type ElementType = PhpElementType
The element type used to represent composite structures in the parsed tree. Read more
Source§impl<'config> Lexer<PhpLanguage> for PhpLexer<'config>
impl<'config> Lexer<PhpLanguage> for PhpLexer<'config>
Source§fn lex<'a, S: Source + ?Sized>(
&self,
source: &'a S,
_edits: &[TextEdit],
cache: &'a mut impl LexerCache<PhpLanguage>,
) -> LexOutput<PhpLanguage>
fn lex<'a, S: Source + ?Sized>( &self, source: &'a S, _edits: &[TextEdit], cache: &'a mut impl LexerCache<PhpLanguage>, ) -> LexOutput<PhpLanguage>
Tokenizes the source text into a sequence of tokens. Read more
Source§impl<'config> Parser<PhpLanguage> for PhpParser<'config>
impl<'config> Parser<PhpLanguage> for PhpParser<'config>
Source§fn parse<'a, S: Source + ?Sized>(
&self,
text: &'a S,
edits: &[TextEdit],
cache: &'a mut impl ParseCache<PhpLanguage>,
) -> ParseOutput<'a, PhpLanguage>
fn parse<'a, S: Source + ?Sized>( &self, text: &'a S, edits: &[TextEdit], cache: &'a mut impl ParseCache<PhpLanguage>, ) -> ParseOutput<'a, PhpLanguage>
The core parsing entry point for converting tokens into a syntax tree. Read more
Source§impl PartialEq for PhpLanguage
impl PartialEq for PhpLanguage
Source§impl<'config> Pratt<PhpLanguage> for PhpParser<'config>
impl<'config> Pratt<PhpLanguage> for PhpParser<'config>
Source§fn primary<'a, S: Source + ?Sized>(
&self,
state: &mut ParserState<'a, PhpLanguage, S>,
) -> &'a GreenNode<'a, PhpLanguage>
fn primary<'a, S: Source + ?Sized>( &self, state: &mut ParserState<'a, PhpLanguage, S>, ) -> &'a GreenNode<'a, PhpLanguage>
Parses a primary expression (e.g., literals, identifiers, group).
Source§fn prefix<'a, S: Source + ?Sized>(
&self,
state: &mut ParserState<'a, PhpLanguage, S>,
) -> &'a GreenNode<'a, PhpLanguage>
fn prefix<'a, S: Source + ?Sized>( &self, state: &mut ParserState<'a, PhpLanguage, S>, ) -> &'a GreenNode<'a, PhpLanguage>
Handles prefix operators and primary expressions. Read more
Source§fn infix<'a, S: Source + ?Sized>(
&self,
state: &mut ParserState<'a, PhpLanguage, S>,
left: &'a GreenNode<'a, PhpLanguage>,
min_precedence: u8,
) -> Option<&'a GreenNode<'a, PhpLanguage>>
fn infix<'a, S: Source + ?Sized>( &self, state: &mut ParserState<'a, PhpLanguage, S>, left: &'a GreenNode<'a, PhpLanguage>, min_precedence: u8, ) -> Option<&'a GreenNode<'a, PhpLanguage>>
Handles infix and postfix operators. Read more
Source§impl Serialize for PhpLanguage
impl Serialize for PhpLanguage
impl Eq for PhpLanguage
impl StructuralPartialEq for PhpLanguage
Auto Trait Implementations§
impl Freeze for PhpLanguage
impl RefUnwindSafe for PhpLanguage
impl Send for PhpLanguage
impl Sync for PhpLanguage
impl Unpin for PhpLanguage
impl UnsafeUnpin for PhpLanguage
impl UnwindSafe for PhpLanguage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more