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

Unified Diff: pkg/analyzer/lib/src/generated/ast.dart

Issue 128443003: Analyzer snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixes for review comments. Created 6 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 | « pkg/analyzer/bin/analyzer.dart ('k') | pkg/analyzer/lib/src/generated/element.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/ast.dart
diff --git a/pkg/analyzer/lib/src/generated/ast.dart b/pkg/analyzer/lib/src/generated/ast.dart
index 91adcd09acb69dd184dbe2c1afc135baf3f8ab58..1f02a022ec439ad6f2ae0f1dacb2e298b5ab7192 100644
--- a/pkg/analyzer/lib/src/generated/ast.dart
+++ b/pkg/analyzer/lib/src/generated/ast.dart
@@ -9984,7 +9984,7 @@ class SimpleIdentifier extends Identifier {
* | basicStringLiteral
*
* rawStringLiteral ::=
- * '@' basicStringLiteral
+ * 'r' basicStringLiteral
*
* simpleStringLiteral ::=
* multiLineStringLiteral
@@ -10036,15 +10036,34 @@ class SimpleStringLiteral extends StringLiteral {
String get value => _value;
/**
+ * Return the offset of the first value character.
+ *
+ * @return the offset of the first value character
+ */
+ int get valueOffset {
+ int valueOffset = 0;
+ if (isRaw) {
+ valueOffset += 1;
+ }
+ if (isMultiline) {
+ valueOffset += 3;
+ } else {
+ valueOffset += 1;
+ }
+ return offset + valueOffset;
+ }
+
+ /**
* Return `true` if this string literal is a multi-line string.
*
* @return `true` if this string literal is a multi-line string
*/
bool get isMultiline {
- if (_value.length < 6) {
+ String lexeme = literal.lexeme;
+ if (lexeme.length < 6) {
return false;
}
- return _value.endsWith("\"\"\"") || _value.endsWith("'''");
+ return lexeme.endsWith("\"\"\"") || lexeme.endsWith("'''");
}
/**
@@ -10052,7 +10071,7 @@ class SimpleStringLiteral extends StringLiteral {
*
* @return `true` if this string literal is a raw string
*/
- bool get isRaw => _value.codeUnitAt(0) == 0x40;
+ bool get isRaw => literal.lexeme.codeUnitAt(0) == 0x72;
bool get isSynthetic => literal.isSynthetic;
« no previous file with comments | « pkg/analyzer/bin/analyzer.dart ('k') | pkg/analyzer/lib/src/generated/element.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698