Commit f1a356c0 authored by Simon Zünd's avatar Simon Zünd Committed by Commit Bot

[torque] Fix typo in Torque grammar. Add escaped double quote to string literals.

The escaped double quote is needed for calling CSA macros that expect
const char* (so the double quotes are preserved).

Example:

type MethodName;
const kProtoSort: MethodName = '\"%TypedArray%.prototype.sort\"';
extern macro ValidateTypedArray(Context, Object, MethodName): JSTypedArray;

R=danno@chromium.org

Bug: v8:7382
Change-Id: Ida554f7d2638fda2c9e1ace9975c3744b5d84050
Reviewed-on: https://chromium-review.googlesource.com/1016400Reviewed-by: 's avatarDaniel Clifford <danno@chromium.org>
Commit-Queue: Simon Zünd <szuend@google.com>
Cr-Commit-Position: refs/heads/master@{#52666}
parent 9a200cd2
......@@ -79,7 +79,7 @@ NOT: '!';
STRING_LITERAL : ('"' ( ESCAPE | ~('"' | '\\' | '\n' | '\r') ) + '"')
| ('\'' ( ESCAPE | ~('"' | '\\' | '\n' | '\r') ) + '\'');
fragment ESCAPE : '\\' ( '\'' | '\\' );
fragment ESCAPE : '\\' ( '\'' | '\\' | '"' );
IDENTIFIER : [A-Za-z][0-9A-Za-z_]* ;
......@@ -122,7 +122,7 @@ labelParameter: IDENTIFIER typeList?;
optionalType: (':' type)?;
optionalLabelList: (LABELS labelParameter (',' labelParameter)*)?;
poptionalOtherwise: (OTHERWISE IDENTIFIER (',' IDENTIFIER)*)?;
optionalOtherwise: (OTHERWISE IDENTIFIER (',' IDENTIFIER)*)?;
parameter: IDENTIFIER ':' type?;
parameterList
......
This diff is collapsed.
Markdown is supported
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