classLocation
final class Location
Public API: explicitly declared with
@visibility public.Where a node begins in the grammar file, as a line and column counted from one.
$location = new \BisonParser\Ast\Location(12, 3);
(string) $location // => '12:3'Properties§
public int $linepublic int $columnMethods§
public function __construct(public int $line, public int $column)Parameters
$line | int | Line number counted from one |
$column | int | Byte column counted from one |
public function __toString(): stringWrites the position as line:column.
Returns
string The positionTest cases 112§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
Other tests reaching this symbol 111
CodePropsTest::testLocationcallsCodeTest::testLocationcallsDeclarationTest::testLocationcallsDefineTest::testLocationcallsExpectTest::testLocationcallsFlagTest::testLocationcallsInitialActionTest::testLocationcallsOptionTest::testLocationcallsParamTest::testLocationcallsPrologueTest::testLocationcallsStartTest::testLocationcallsAliasTest::testTranslatablecallsPrecedenceDeclarationTest::testLocationcallsSymbolDeclarationTest::testLocationcallsSymbolEntryTest::testAliascallsUnionDeclarationTest::testLocationcallsEpilogueTest::testCodecallsGrammarFileTest::testAllDeclarationscallsGrammarFileTest::testRulescallsLineTest::testLocationcallsActionTest::testLocationcallsAlternativeTest::testSymbolscallsDprecItemTest::testLocationcallsEmptyItemTest::testLocationcallsExpectItemTest::testLocationcallsMergeItemTest::testLocationcallsPrecItemTest::testLocationcallsPredicateTest::testLocationcallsRhsItemTest::testLocationcallsRuleTest::testAlternativescallsSymbolItemTest::testLocationcallsSymbolTest::testIsIdentifiercallsTagTest::testIsAnycallsTagTest::testIsNonecallsBisonGrammarCompilerTestcallsBisonGrammarReaderTestcallsParserTestcallsDeclarationPrinterTest::testCodecallsDeclarationPrinterTest::testDefinecallsDeclarationPrinterTest::testEntriescallsDeclarationPrinterTest::testLinecallsDeclarationPrinterTest::testOptioncallsDeclarationPrinterTest::testPrintcallsDeclarationPrinterTest::testPropscallsDeclarationPrinterTest::testTargetscallsDeclarationPrinterTest::testUnioncallsPrinterTest::testAlternativecallsPrinterTest::testPrintcallsPrinterTest::testRulecallsRhsPrinterTest::testPrintcallsSymbolPrinterTest::testSymbolcallsSymbolPrinterTest::testTagcallsCodeReaderTestcallsCursorTestcallsEscapesTest::testBytecallsEscapesTest::testByteRejectsZerocallsEscapesTest::testDecodecallsEscapesTest::testDecodeRejectsAnUnknownEscapecallsEscapesTest::testDecodeRejectsATrailingBackslashcallsEscapesTest::testEscapecallsEscapesTest::testEscapeRejectsANullHexadecimalEscapecallsEscapesTest::testEscapeRejectsANullOctalEscapecallsEscapesTest::testEscapeRejectsANullUniversalCharactercallsEscapesTest::testEscapeRejectsANullWideUniversalCharactercallsEscapesTest::testEscapeRejectsANumberAboveOneBytecallsEscapesTest::testEscapeRejectsAWideUniversalCharactercallsScannerTest::testIdentifiercallsScannerTest::testIntegercallsScannerTest::testIntegerRejectsADecimalOutOfRangecallsScannerTest::testIntegerRejectsADecimalTooLongToReadcallsScannerTest::testIntegerRejectsAHexadecimalOutOfRangecallsScannerTest::testIntegerRejectsAHexadecimalTooLongToReadcallsScannerTest::testIntegerRejectsAnIdentifierStartingWithADigitcallsScannerTest::testLiteralcallsScannerTest::testLiteralRejectsAnEmptyCharactercallsScannerTest::testLiteralRejectsAnUnterminatedCharactercallsScannerTest::testLiteralRejectsAnUnterminatedStringcallsScannerTest::testLiteralRejectsAWideCharactercallsScannerTest::testPercentcallsScannerTest::testPercentRejectsABarePercentSigncallsScannerTest::testPercentRejectsAnUnknownDirectivecallsScannerTest::testPunctuationcallsScannerTest::testTagcallsScannerTest::testTagRejectsAnUnterminatedTagcallsTokenTest::testDescribecallsTokenTest::testIscallsTokenTest::testIsDirectivecallsDeclarationParserTest::testDefinecallsDeclarationParserTest::testDefineRejectsAMissingVariablecallsDeclarationParserTest::testDirectiveRejectsARuleModifiercallsDeclarationParserTest::testLinecallsDeclarationParserTest::testStartscallsGrammarParserTestcallsRuleParserTest::testAlternativecallsRuleParserTest::testCheckEmptycallsRuleParserTest::testParseRejectsAMissingColoncallsSymbolListParserTest::testKindcallsSymbolListParserTest::testStartsSymbolcallsSymbolListParserTest::testSymbolcallsSymbolListParserTest::testSymbolRejectsAnotherTokencallsTokenStreamTest::testAcceptcallsTokenStreamTest::testExpectcallsTokenStreamTest::testExpectRejectsAnotherTokencallsTokenStreamTest::testIscallsTokenStreamTest::testIsDirectivecallsTokenStreamTest::testNextcallsTokenStreamTest::testPeekcallsSyntaxExceptionTest::testGetMessagecallsSyntaxExceptionTest::testInvalidcallsSyntaxExceptionTest::testUnexpectedcallsSyntaxExceptionTest::testUnterminatedcalls
Relations§
Instantiated in 1
Type declarations 68
- type BisonParser\Ast\Declaration\Code packages/bison-parser/src/Ast/Declaration/Code.php:29
- type BisonParser\Ast\Declaration\Code packages/bison-parser/src/Ast/Declaration/Code.php:38
- type BisonParser\Ast\Declaration\CodeProps packages/bison-parser/src/Ast/Declaration/CodeProps.php:34
- type BisonParser\Ast\Declaration\CodeProps packages/bison-parser/src/Ast/Declaration/CodeProps.php:43
- type BisonParser\Ast\Declaration\Declaration packages/bison-parser/src/Ast/Declaration/Declaration.php:25
- type BisonParser\Ast\Declaration\Define packages/bison-parser/src/Ast/Declaration/Define.php:36
- type BisonParser\Ast\Declaration\Define packages/bison-parser/src/Ast/Declaration/Define.php:45
- type BisonParser\Ast\Declaration\Expect packages/bison-parser/src/Ast/Declaration/Expect.php:29
- type BisonParser\Ast\Declaration\Expect packages/bison-parser/src/Ast/Declaration/Expect.php:38
- type BisonParser\Ast\Declaration\Flag packages/bison-parser/src/Ast/Declaration/Flag.php:32
- type BisonParser\Ast\Declaration\Flag packages/bison-parser/src/Ast/Declaration/Flag.php:41
- type BisonParser\Ast\Declaration\InitialAction packages/bison-parser/src/Ast/Declaration/InitialAction.php:26
- type BisonParser\Ast\Declaration\InitialAction packages/bison-parser/src/Ast/Declaration/InitialAction.php:35
- type BisonParser\Ast\Declaration\Option packages/bison-parser/src/Ast/Declaration/Option.php:33
- type BisonParser\Ast\Declaration\Option packages/bison-parser/src/Ast/Declaration/Option.php:42
- type BisonParser\Ast\Declaration\Param packages/bison-parser/src/Ast/Declaration/Param.php:29
- type BisonParser\Ast\Declaration\Param packages/bison-parser/src/Ast/Declaration/Param.php:38
- type BisonParser\Ast\Declaration\Prologue packages/bison-parser/src/Ast/Declaration/Prologue.php:26
- type BisonParser\Ast\Declaration\Prologue packages/bison-parser/src/Ast/Declaration/Prologue.php:35
- type BisonParser\Ast\Declaration\Start packages/bison-parser/src/Ast/Declaration/Start.php:27
- type BisonParser\Ast\Declaration\Start packages/bison-parser/src/Ast/Declaration/Start.php:36
- type BisonParser\Ast\Declaration\Symbols\Alias packages/bison-parser/src/Ast/Declaration/Symbols/Alias.php:30
- type BisonParser\Ast\Declaration\Symbols\PrecedenceDeclaration packages/bison-parser/src/Ast/Declaration/Symbols/PrecedenceDeclaration.php:34
- type BisonParser\Ast\Declaration\Symbols\PrecedenceDeclaration packages/bison-parser/src/Ast/Declaration/Symbols/PrecedenceDeclaration.php:43
- type BisonParser\Ast\Declaration\Symbols\SymbolDeclaration packages/bison-parser/src/Ast/Declaration/Symbols/SymbolDeclaration.php:33
- type BisonParser\Ast\Declaration\Symbols\SymbolDeclaration packages/bison-parser/src/Ast/Declaration/Symbols/SymbolDeclaration.php:42
- type BisonParser\Ast\Declaration\UnionDeclaration packages/bison-parser/src/Ast/Declaration/UnionDeclaration.php:29
- type BisonParser\Ast\Declaration\UnionDeclaration packages/bison-parser/src/Ast/Declaration/UnionDeclaration.php:38
- type BisonParser\Ast\Epilogue packages/bison-parser/src/Ast/Epilogue.php:24
- type BisonParser\Ast\Line packages/bison-parser/src/Ast/Line.php:35
- type BisonParser\Ast\Line packages/bison-parser/src/Ast/Line.php:42
- type BisonParser\Ast\Rule\Action packages/bison-parser/src/Ast/Rule/Action.php:37
- type BisonParser\Ast\Rule\Action packages/bison-parser/src/Ast/Rule/Action.php:46
- type BisonParser\Ast\Rule\Alternative packages/bison-parser/src/Ast/Rule/Alternative.php:33
- type BisonParser\Ast\Rule\DprecItem packages/bison-parser/src/Ast/Rule/DprecItem.php:26
- type BisonParser\Ast\Rule\DprecItem packages/bison-parser/src/Ast/Rule/DprecItem.php:35
- type BisonParser\Ast\Rule\EmptyItem packages/bison-parser/src/Ast/Rule/EmptyItem.php:23
- type BisonParser\Ast\Rule\EmptyItem packages/bison-parser/src/Ast/Rule/EmptyItem.php:32
- type BisonParser\Ast\Rule\ExpectItem packages/bison-parser/src/Ast/Rule/ExpectItem.php:28
- type BisonParser\Ast\Rule\ExpectItem packages/bison-parser/src/Ast/Rule/ExpectItem.php:37
- type BisonParser\Ast\Rule\MergeItem packages/bison-parser/src/Ast/Rule/MergeItem.php:26
- type BisonParser\Ast\Rule\MergeItem packages/bison-parser/src/Ast/Rule/MergeItem.php:35
- type BisonParser\Ast\Rule\PrecItem packages/bison-parser/src/Ast/Rule/PrecItem.php:27
- type BisonParser\Ast\Rule\PrecItem packages/bison-parser/src/Ast/Rule/PrecItem.php:36
- type BisonParser\Ast\Rule\Predicate packages/bison-parser/src/Ast/Rule/Predicate.php:26
- type BisonParser\Ast\Rule\Predicate packages/bison-parser/src/Ast/Rule/Predicate.php:35
- type BisonParser\Ast\Rule\RhsItem packages/bison-parser/src/Ast/Rule/RhsItem.php:25
- type BisonParser\Ast\Rule\Rule packages/bison-parser/src/Ast/Rule/Rule.php:34
- type BisonParser\Ast\Rule\SymbolItem packages/bison-parser/src/Ast/Rule/SymbolItem.php:38
- type BisonParser\Ast\Symbol packages/bison-parser/src/Ast/Symbol.php:35
- type BisonParser\Ast\Tag packages/bison-parser/src/Ast/Tag.php:39
- type BisonParser\Scanner\Cursor packages/bison-parser/src/Scanner/Cursor.php:66
- type BisonParser\Scanner\Escapes packages/bison-parser/src/Scanner/Escapes.php:32
- type BisonParser\Scanner\Escapes packages/bison-parser/src/Scanner/Escapes.php:61
- type BisonParser\Scanner\Escapes packages/bison-parser/src/Scanner/Escapes.php:92
- type BisonParser\Scanner\Scanner packages/bison-parser/src/Scanner/Scanner.php:146
- type BisonParser\Scanner\Scanner packages/bison-parser/src/Scanner/Scanner.php:181
- type BisonParser\Scanner\Scanner packages/bison-parser/src/Scanner/Scanner.php:236
- type BisonParser\Scanner\Scanner packages/bison-parser/src/Scanner/Scanner.php:262
- type BisonParser\Scanner\Scanner packages/bison-parser/src/Scanner/Scanner.php:307
- type BisonParser\Scanner\Scanner packages/bison-parser/src/Scanner/Scanner.php:348
- type BisonParser\Scanner\Token packages/bison-parser/src/Scanner/Token.php:29
- type BisonParser\Syntax\DeclarationParser packages/bison-parser/src/Syntax/DeclarationParser.php:148
- type BisonParser\Syntax\RuleParser packages/bison-parser/src/Syntax/RuleParser.php:81
- type BisonParser\SyntaxException packages/bison-parser/src/SyntaxException.php:26
- type BisonParser\SyntaxException packages/bison-parser/src/SyntaxException.php:40
- type BisonParser\SyntaxException packages/bison-parser/src/SyntaxException.php:54
- type BisonParser\SyntaxException packages/bison-parser/src/SyntaxException.php:67