mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[intellij sh] IDEA-243118 Fix substring replacement parsing
GitOrigin-RevId: 704e4c4f4b3d7700ebe11b15146207d21d74e51b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
e4f8c77a28
commit
672dc1c890
File diff suppressed because it is too large
Load Diff
@@ -123,6 +123,7 @@ Filedescriptor = "&" {IntegerLiteral} | "&-" //todo:: check the usage
|
||||
AssigOp = "=" | "+="
|
||||
|
||||
ParamExpansionName = ([a-zA-Z0-9_] | {EscapedAnyChar})*
|
||||
ParameterExpansionExpr = [^}/$`\"]* | {EscapedChar}*
|
||||
ParamExpansionSeparator = "#""#"? | "!" | ":" | ":"?"=" | ":"?"+" | ":"?"-" | ":"?"?" | "@" | ","","? | "^""^"? | "*"
|
||||
|
||||
HeredocMarker = [^\r\n|&\\;()[] \t\"'] | {EscapedChar}
|
||||
@@ -307,8 +308,8 @@ EvalContent = [^\r\n$\"`'() ;] | {EscapedAnyChar}
|
||||
}
|
||||
|
||||
<PARAMETER_EXPANSION_EXPR> {
|
||||
[^}/$`\"]* { popState(); return WORD; }
|
||||
[^] { popState(); yypushback(yylength()); }
|
||||
{ParameterExpansionExpr} { popState(); return WORD; }
|
||||
[^] { popState(); yypushback(yylength()); }
|
||||
}
|
||||
|
||||
<CASE_CONDITION> {
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
arg="${arg//\\/\\\\}"
|
||||
printf "%s\n" "${arg}"
|
||||
|
||||
arg="${arg//\\/\\\\\}"
|
||||
printf "%s\n" "${arg} ff}"
|
||||
#IDEA-243118
|
||||
"\"${string//\"/\\\"}\""
|
||||
@@ -27,29 +27,17 @@ word ('arg')
|
||||
CLOSE_QUOTE ('"')
|
||||
\n ('\n')
|
||||
\n ('\n')
|
||||
word ('arg')
|
||||
= ('=')
|
||||
OPEN_QUOTE ('"')
|
||||
$ ('$')
|
||||
{ ('{')
|
||||
word ('arg')
|
||||
param_separator ('//')
|
||||
word ('\\')
|
||||
param_separator ('/')
|
||||
word ('\\\\\')
|
||||
} ('}')
|
||||
CLOSE_QUOTE ('"')
|
||||
Comment ('#IDEA-243118')
|
||||
\n ('\n')
|
||||
word ('printf')
|
||||
WHITE_SPACE (' ')
|
||||
OPEN_QUOTE ('"')
|
||||
STRING_CONTENT ('%s\n')
|
||||
CLOSE_QUOTE ('"')
|
||||
WHITE_SPACE (' ')
|
||||
OPEN_QUOTE ('"')
|
||||
STRING_CONTENT ('\"')
|
||||
$ ('$')
|
||||
{ ('{')
|
||||
word ('arg')
|
||||
word ('string')
|
||||
param_separator ('//')
|
||||
word ('\"')
|
||||
param_separator ('/')
|
||||
word ('\\\"')
|
||||
} ('}')
|
||||
STRING_CONTENT (' ff}')
|
||||
STRING_CONTENT ('\"')
|
||||
CLOSE_QUOTE ('"')
|
||||
Reference in New Issue
Block a user