#[repr(u8)]pub enum ParserIssueCode {
UnreachableCode = 0,
PHPOpeningTagNotSupported = 1,
PHPClosingTagNotSupported = 2,
UnitEnumCaseCannotHaveValue = 3,
BackedEnumCaseMustHaveValue = 4,
MissingItemDefinitionAfterAttributes = 5,
ReservedKeywordCannotBeUsedForTypeName = 6,
ReservedKeywordCannotBeUsedForConstantName = 7,
TypeCannotBeUsedInCurrentContext = 8,
MissingItemExpressionAfterAttributes = 9,
InvalidEnumBackingType = 10,
UnexpectedToken = 11,
}Variantsยง
UnreachableCode = 0
An unreachable code was encountered.
PHPOpeningTagNotSupported = 1
PHP opening tag is not supported ( code = 1 )
Example:
<?php
class Foo {}Possible solution(s):
- Remove the opening tag (
<?php)
PHPClosingTagNotSupported = 2
PHP closing tag is not supported ( code = 2 )
Example:
class Foo {}
?>Possible solution(s):
- Remove the closing tag (
?>)
UnitEnumCaseCannotHaveValue = 3
Unit enum case cannot have a value ( code = 3 )
Example:
enum Foo {
Bar = 1;
}Possible solution(s):
- Remove the value
- Change the enum to a backed enum
BackedEnumCaseMustHaveValue = 4
Backed enum case must have a value ( code = 4 )
Example:
enum Foo: int {
Bar;
}Possible solution(s):
- Add a value
- Change the enum to a unit enum
MissingItemDefinitionAfterAttributes = 5
Missing item definition after attributes ( code = 7 )
Example:
#[Foo, Bar]Possible solution(s):
- Add an item definition after the attributes
- Remove the attributes
ReservedKeywordCannotBeUsedForTypeName = 6
Reserved keyword cannot be used for type name ( code = 8 )
Example:
class if {}Possible solution(s):
- Use a different name
ReservedKeywordCannotBeUsedForConstantName = 7
Reserved keyword cannot be used for constant name ( code = 9 )
Example:
const if = 1;Possible solution(s):
- Use a different name
TypeCannotBeUsedInCurrentContext = 8
Type cannot be used in current context ( code = 10 )
Example:
use self;Possible solution(s):
- Use a different type
MissingItemExpressionAfterAttributes = 9
Missing item expression after attribute(s) ( code = 11 )
Example:
function foo(): void {
#[Foo]
}Possible solution(s):
- Add an item expression after the attribute(s)
- Remove the attribute(s)
InvalidEnumBackingType = 10
Enum backing type must be either int or string ( code = 12 )
Example:
enum: float {
}Possible solution(s):
- Change the backing type to
intorstring
UnexpectedToken = 11
Unexpected token ( code = 13 )
Example:
function foo() -> void {
}Trait Implementationsยง
Sourceยงimpl Clone for ParserIssueCode
impl Clone for ParserIssueCode
Sourceยงfn clone(&self) -> ParserIssueCode
fn clone(&self) -> ParserIssueCode
1.0.0 ยท Sourceยงfn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more