create ForInitSemicolonToken
and ForCondSemicolonToken
comment anchors
This commit is contained in:
parent
6ccca996a8
commit
22cca215df
@ -22,6 +22,8 @@ const (
|
||||
DoToken
|
||||
WhileToken
|
||||
EndwhileToken
|
||||
ForInitSemicolonToken
|
||||
ForCondSemicolonToken
|
||||
ForToken
|
||||
EndforToken
|
||||
ForeachToken
|
||||
@ -182,6 +184,8 @@ var TokenNames = map[TokenName]string{
|
||||
DoToken: "DoToken",
|
||||
WhileToken: "WhileToken",
|
||||
EndwhileToken: "EndwhileToken",
|
||||
ForInitSemicolonToken: "ForInitSemicolonToken",
|
||||
ForCondSemicolonToken: "ForCondSemicolonToken",
|
||||
ForToken: "ForToken",
|
||||
EndforToken: "EndforToken",
|
||||
ForeachToken: "ForeachToken",
|
||||
|
@ -3194,8 +3194,8 @@ yydefault:
|
||||
// save comments
|
||||
yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[1].token, comment.ForToken)
|
||||
yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[2].token, comment.OpenParenthesisToken)
|
||||
yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.SemiColonToken)
|
||||
yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[6].token, comment.SemiColonToken)
|
||||
yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[4].token, comment.ForInitSemicolonToken)
|
||||
yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[6].token, comment.ForCondSemicolonToken)
|
||||
yylex.(*Parser).comments.AddFromToken(yyVAL.node, yyDollar[8].token, comment.CloseParenthesisToken)
|
||||
}
|
||||
case 137:
|
||||
|
@ -832,8 +832,8 @@ statement:
|
||||
// save comments
|
||||
yylex.(*Parser).comments.AddFromToken($$, $1, comment.ForToken)
|
||||
yylex.(*Parser).comments.AddFromToken($$, $2, comment.OpenParenthesisToken)
|
||||
yylex.(*Parser).comments.AddFromToken($$, $4, comment.SemiColonToken)
|
||||
yylex.(*Parser).comments.AddFromToken($$, $6, comment.SemiColonToken)
|
||||
yylex.(*Parser).comments.AddFromToken($$, $4, comment.ForInitSemicolonToken)
|
||||
yylex.(*Parser).comments.AddFromToken($$, $6, comment.ForCondSemicolonToken)
|
||||
yylex.(*Parser).comments.AddFromToken($$, $8, comment.CloseParenthesisToken)
|
||||
}
|
||||
| T_SWITCH '(' expr ')' switch_case_list
|
||||
|
Loading…
Reference in New Issue
Block a user