OLD | NEW |
1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dartino 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
4 | 4 |
5 library fletchc.hub.sentence_parser; | 5 library dartino_compiler.hub.sentence_parser; |
6 | 6 |
7 import 'dart:convert' show | 7 import 'dart:convert' show |
8 JSON; | 8 JSON; |
9 | 9 |
10 import '../verbs/actions.dart' show | 10 import '../verbs/actions.dart' show |
11 Action, | 11 Action, |
12 commonActions, | 12 commonActions, |
13 uncommonActions; | 13 uncommonActions; |
14 | 14 |
15 import '../verbs/infrastructure.dart' show | 15 import '../verbs/infrastructure.dart' show |
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
411 final String userInput; | 411 final String userInput; |
412 | 412 |
413 const ErrorTarget(this.errorKind, this.userInput) | 413 const ErrorTarget(this.errorKind, this.userInput) |
414 : super(null); | 414 : super(null); |
415 | 415 |
416 bool get isErroneous => true; | 416 bool get isErroneous => true; |
417 | 417 |
418 String toString() => "ErrorTarget($errorKind, ${quoteString(userInput)})"; | 418 String toString() => "ErrorTarget($errorKind, ${quoteString(userInput)})"; |
419 } | 419 } |
420 | 420 |
421 /// A sentence is a written command to fletch. Normally, this command is | 421 /// A sentence is a written command to dartino. Normally, this command is |
422 /// written on the command-line and should be easy to write without having | 422 /// written on the command-line and should be easy to write without having |
423 /// getting into conflict with Unix shell command line parsing. | 423 /// getting into conflict with Unix shell command line parsing. |
424 /// | 424 /// |
425 /// An example sentence is: | 425 /// An example sentence is: |
426 /// `create class MyClass in session MySession` | 426 /// `create class MyClass in session MySession` |
427 /// | 427 /// |
428 /// In this example, `create` is a [Verb], `class MyClass` is a [Target], and | 428 /// In this example, `create` is a [Verb], `class MyClass` is a [Target], and |
429 /// `in session MySession` is a [Preposition]. | 429 /// `in session MySession` is a [Preposition]. |
430 class Sentence { | 430 class Sentence { |
431 /// For example, `create`. | 431 /// For example, `create`. |
(...skipping 24 matching lines...) Expand all Loading... |
456 this.prepositions, | 456 this.prepositions, |
457 this.targets, | 457 this.targets, |
458 this.trailing, | 458 this.trailing, |
459 this.version, | 459 this.version, |
460 this.currentDirectory, | 460 this.currentDirectory, |
461 this.programName, | 461 this.programName, |
462 this.arguments); | 462 this.arguments); |
463 | 463 |
464 String toString() => "Sentence($verb, $prepositions, $targets)"; | 464 String toString() => "Sentence($verb, $prepositions, $targets)"; |
465 } | 465 } |
OLD | NEW |