Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1547)

Unified Diff: tools/gn/parser.cc

Issue 1546393002: Allow \n in GN string literals (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix documentation line Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/gn/string_utils.cc » ('j') | tools/gn/string_utils.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/parser.cc
diff --git a/tools/gn/parser.cc b/tools/gn/parser.cc
index 79966b8ac59c4ce096b7124899df6d01046d4343..d3e2f0ff2efec7fa9cb33efac51f31d856239f4c 100644
--- a/tools/gn/parser.cc
+++ b/tools/gn/parser.cc
@@ -62,7 +62,8 @@ const char kGrammar_Help[] =
" escape = `\\` ( \"$\" | `\"` | char ) .\n"
" BracketExpansion = \"{\" ( identifier | ArrayAccess | ScopeAccess "
") \"}\" .\n"
- " expansion = \"$\" ( identifier | BracketExpansion ) .\n"
+ " Hex = \"0x\" [0-9A-Fa-f][0-9A-Fa-f]\n"
+ " expansion = \"$\" ( identifier | BracketExpansion | Hex ) .\n"
" char = /* any character except \"$\", `\"`, or newline "
"*/ .\n"
"\n"
@@ -74,6 +75,9 @@ const char kGrammar_Help[] =
"\n"
" All other backslashes represent themselves.\n"
"\n"
+ " To insert an arbitrary byte value, use $0xFF. For example, to\n"
+ " insert a newline character: \"Line one$0x0ALine two\".\n"
+ "\n"
"Punctuation\n"
"\n"
" The following character sequences represent punctuation:\n"
« no previous file with comments | « no previous file | tools/gn/string_utils.cc » ('j') | tools/gn/string_utils.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698