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

Unified Diff: lib/src/yaml_node.dart

Issue 1329763002: Don't use regular expressions in Loader. (Closed) Base URL: git@github.com:dart-lang/yaml@master
Patch Set: Code review changes Created 5 years, 3 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 | « lib/src/loader.dart ('k') | lib/src/yaml_node_wrapper.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/yaml_node.dart
diff --git a/lib/src/yaml_node.dart b/lib/src/yaml_node.dart
index 027bc1b32011ce2c85878fe6be7366e6962e60d7..d4961bb91d61bac5e8709acb6b9de6677e3e4215 100644
--- a/lib/src/yaml_node.dart
+++ b/lib/src/yaml_node.dart
@@ -9,6 +9,7 @@ import 'dart:collection' as collection;
import 'package:collection/collection.dart';
import 'package:source_span/source_span.dart';
+import 'event.dart';
import 'null_span.dart';
import 'style.dart';
import 'yaml_node_wrapper.dart';
@@ -163,7 +164,14 @@ class YamlScalar extends YamlNode {
}
/// Users of the library should not use this constructor.
- YamlScalar.internal(this.value, SourceSpan span, this.style) {
+ YamlScalar.internal(this.value, ScalarEvent scalar)
+ : style = scalar.style {
+ _span = span;
+ }
+
+ /// Users of the library should not use this constructor.
+ YamlScalar.internalWithSpan(this.value, SourceSpan span)
+ : style = ScalarStyle.ANY {
_span = span;
}
« no previous file with comments | « lib/src/loader.dart ('k') | lib/src/yaml_node_wrapper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698