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

Side by Side Diff: pkg/csslib/lib/parser.dart

Issue 23576012: Added .scss transform (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: cleanup Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | pkg/csslib/lib/transform.dart » ('j') | pkg/csslib/lib/transform.dart » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library csslib.parser; 5 library csslib.parser;
6 6
7 import 'dart:async';
7 import 'dart:math' as math; 8 import 'dart:math' as math;
8 9
10 import 'package:barback/barback.dart';
Siggi Cherem (dart-lang) 2013/09/08 20:31:33 note barback.dart depends on dart:io, so you might
11
9 import 'package:source_maps/span.dart' show SourceFile, Span, FileSpan; 12 import 'package:source_maps/span.dart' show SourceFile, Span, FileSpan;
10 13
11 import "visitor.dart"; 14 import "visitor.dart";
12 import 'src/messages.dart'; 15 import 'src/messages.dart';
13 import 'src/options.dart'; 16 import 'src/options.dart';
14 17
15 part 'src/analyzer.dart'; 18 part 'src/analyzer.dart';
16 part 'src/property.dart'; 19 part 'src/property.dart';
17 part 'src/token.dart'; 20 part 'src/token.dart';
18 part 'src/tokenizer_base.dart'; 21 part 'src/tokenizer_base.dart';
19 part 'src/tokenizer.dart'; 22 part 'src/tokenizer.dart';
20 part 'src/tokenkind.dart'; 23 part 'src/tokenkind.dart';
21 24
22
23 /** Used for parser lookup ahead (used for nested selectors Less support). */ 25 /** Used for parser lookup ahead (used for nested selectors Less support). */
24 class ParserState extends TokenizerState { 26 class ParserState extends TokenizerState {
25 final Token peekToken; 27 final Token peekToken;
26 final Token previousToken; 28 final Token previousToken;
27 29
28 ParserState(this.peekToken, this.previousToken, Tokenizer tokenizer) 30 ParserState(this.peekToken, this.previousToken, Tokenizer tokenizer)
29 : super(tokenizer); 31 : super(tokenizer);
30 } 32 }
31 33
32 void _createMessages({List errors, List options}) { 34 void _createMessages({List errors, List options}) {
(...skipping 2360 matching lines...) Expand 10 before | Expand all | Expand 10 after
2393 2395
2394 if (replace != null && result == null) { 2396 if (replace != null && result == null) {
2395 result = new StringBuffer(text.substring(0, i)); 2397 result = new StringBuffer(text.substring(0, i));
2396 } 2398 }
2397 2399
2398 if (result != null) result.write(replace != null ? replace : text[i]); 2400 if (result != null) result.write(replace != null ? replace : text[i]);
2399 } 2401 }
2400 2402
2401 return result == null ? text : result.toString(); 2403 return result == null ? text : result.toString();
2402 } 2404 }
OLDNEW
« no previous file with comments | « no previous file | pkg/csslib/lib/transform.dart » ('j') | pkg/csslib/lib/transform.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698