Skip to content

Commit ec120ee

Browse files
committed
Update peg parser tests to r'' strings
Review URL: https://codereview.chromium.org//10991031 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12889 260f80e4-7a28-3924-810f-c04153c831b5
1 parent bf978d4 commit ec120ee

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

utils/peg/pegparser.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,8 @@ class Grammar {
287287
var line = state._text.substring(start, end);
288288
var indicator = '';
289289
for (var i = 0; i < line.length && start + i < state.max_pos; i++)
290-
indicator = indicator + ' ';
291-
indicator = indicator + '^';
290+
indicator = ' $indicator';
291+
indicator = '$indicator^';
292292
// TODO: Convert to an exception.
293293
print(message);
294294
print(line);
@@ -614,7 +614,7 @@ String _formatMultiRule(String functor, List rules) {
614614
class _SequenceRule extends _Rule {
615615
// This rule matches the component rules in order.
616616
final List<_Rule> _rules;
617-
final int _generatingSubRules = 0;
617+
final int _generatingSubRules;
618618
final Function _reducer;
619619
bool _generatesValue;
620620
_SequenceRule(List<_Rule> this._rules,

utils/tests/peg/peg.status

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
[ $runtime == opera ]
66
peg_test: Skip
77

8-
[ $compiler == dart2js && ($runtime == ff || $runtime == ie || $runtime == chrome || $runtime == safari) ]
9-
peg_test: Skip # TODO(ahe): Triage
10-
118
[ $arch == x64 ]
129
*: Skip
1310

utils/tests/peg/peg_test.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ testBlockComment() {
4343
check(g, a, "x /*/***/ x", 'EOF in block comment');
4444
check(g, a, "x /*/*/x**/**/ x", '[x,x]');
4545

46-
check(g, a, @"""
46+
check(g, a, r"""
4747
/* Comment */
4848
/* Following comment with /* nested comment*/ */
4949
x
@@ -126,9 +126,9 @@ testC() {
126126

127127
// Lexical elements.
128128
var idStartChar = CHAR(
129-
@"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz");
129+
r"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz");
130130
var idNextChar = CHAR(
131-
@"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789$_");
131+
r"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789$_");
132132

133133
var id = TEXT(LEX('identifier', [idStartChar, MANY(idNextChar, min: 0)]));
134134

0 commit comments

Comments
 (0)