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

Unified Diff: frog/leg/scanner/scanner_task.dart

Issue 9642001: Make string juxtaposition combine properly with string interpolations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments. Created 8 years, 9 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 | « frog/leg/scanner/parser.dart ('k') | frog/leg/ssa/builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/leg/scanner/scanner_task.dart
diff --git a/frog/leg/scanner/scanner_task.dart b/frog/leg/scanner/scanner_task.dart
index b0071dce2faebe37d84ffa2e6388f23d9db19e3f..cd4e2432658f131b3758db044e6d241418110ab2 100644
--- a/frog/leg/scanner/scanner_task.dart
+++ b/frog/leg/scanner/scanner_task.dart
@@ -23,8 +23,10 @@ class ScannerTask extends CompilerTask {
Uri cwd = new Uri(scheme: 'file', path: compiler.currentDirectory);
Uri base = cwd.resolve(library.script.name.toString());
for (ScriptTag tag in library.tags.reverse()) {
- SourceString argument = tag.argument.value.copyWithoutQuotes(1, 1);
- Uri resolved = base.resolve(argument.slowToString());
+ StringNode argument = tag.argument;
+ // TODO(lrn): Support interpolations here. We need access to the
+ // special constants that can be inserted into script tag strings.
+ Uri resolved = base.resolve(argument.dartString.slowToString());
if (tag.isImport()) {
// It is not safe to import other libraries at this point as
// another library could then observe the current library
@@ -53,8 +55,8 @@ class ScannerTask extends CompilerTask {
for (ScriptTag tag in imports.toLink()) {
// Now that we have processed all the source tags, it is safe to
// start loading other libraries.
- SourceString argument = tag.argument.value.copyWithoutQuotes(1, 1);
- Uri resolved = base.resolve(argument.slowToString());
+ StringNode argument = tag.argument;
+ Uri resolved = base.resolve(argument.dartString.slowToString());
if (resolved.toString() == "dart:core") {
implicitlyImportCoreLibrary = false;
}
@@ -104,7 +106,8 @@ class ScannerTask extends CompilerTask {
void importLibrary(LibraryElement library, LibraryElement imported,
ScriptTag tag) {
if (tag !== null && tag.prefix !== null) {
- SourceString prefix = tag.prefix.dartString.source;
+ SourceString prefix =
+ new SourceString(tag.prefix.dartString.slowToString());
Element e = library.find(prefix);
if (e === null) {
e = new PrefixElement(prefix, library);
« no previous file with comments | « frog/leg/scanner/parser.dart ('k') | frog/leg/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698