Commit 6c092c74 authored by Custom2043's avatar Custom2043
Browse files

Fix npe when a parser character has no end

parent cf743136
......@@ -6,4 +6,5 @@ gen/**
**.jar
**.jardesc
test.txt
\ No newline at end of file
test.txt
/bin/
Dec : {Modifier} Header Body
Header :
Result Declarator [Throws]
Method Declarator :
Identifier ( [FormalParameterList] ) [Dims]
ReceiverParameter :
{Annotation} UnannType [Identifier .] this
#Dims = {{Annotation} "[]"}
#VariableDeclaratorId = Identifier [Dims]
#VariableModifier = Annotation|"final"
#Parametre = [{VariableModifier}] UnannType VariableDeclaratorId|([{Annotation}] "..." Identifier)
#ParameterList = {Parametre ","|}
#Header = Identifier "("
MethodDeclarator : [{MethodModifier}] Header
......@@ -122,7 +122,7 @@ public class ParserStringGenerator
if (charTokens instanceof CharacterToken)
{
CharacterToken t = ((CharacterToken)charTokens);
Token character = end ? t.character2[j] : t.character1[j];
Token character = end && t.character2[j] != null ? t.character2[j] : t.character1[j];
if (character instanceof NumberChar)
{
parserCharacterBuilder.append("0");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment