| 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 dartino_compiler.verbs.implementation; | 5 library dartino_compiler.verbs.implementation; |
| 6 | 6 |
| 7 import 'dart:async' show | 7 import 'dart:async' show |
| 8 Future, | 8 Future, |
| 9 StreamIterator; | 9 StreamIterator; |
| 10 | 10 |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 } else if (action.requiresTargetSession && | 394 } else if (action.requiresTargetSession && |
| 395 target is NamedTarget && | 395 target is NamedTarget && |
| 396 target.name == null) { | 396 target.name == null) { |
| 397 throwFatalError(DiagnosticKind.missingSessionName); | 397 throwFatalError(DiagnosticKind.missingSessionName); |
| 398 } | 398 } |
| 399 | 399 |
| 400 String targetName; | 400 String targetName; |
| 401 Uri targetUri; | 401 Uri targetUri; |
| 402 if (target is NamedTarget) { | 402 if (target is NamedTarget) { |
| 403 targetName = target.name; | 403 targetName = target.name; |
| 404 if (target.kind == TargetKind.FILE) { | 404 if (target.kind == TargetKind.FILE || target.kind == TargetKind.SERVE) { |
| 405 targetUri = fileUri(targetName, base); | 405 targetUri = fileUri(targetName, base); |
| 406 } | 406 } |
| 407 } | 407 } |
| 408 | 408 |
| 409 if (!action.allowsTrailing && trailing != null) { | 409 if (!action.allowsTrailing && trailing != null) { |
| 410 throwFatalError( | 410 throwFatalError( |
| 411 DiagnosticKind.extraArguments, userInput: trailing.join(' ')); | 411 DiagnosticKind.extraArguments, userInput: trailing.join(' ')); |
| 412 } | 412 } |
| 413 | 413 |
| 414 return new AnalyzedSentence( | 414 return new AnalyzedSentence( |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 527 context.clientConnection.analytics.writeOptOut(); | 527 context.clientConnection.analytics.writeOptOut(); |
| 528 print(analyticsOptOutNotification); | 528 print(analyticsOptOutNotification); |
| 529 } | 529 } |
| 530 return internalPerformVerb(context); | 530 return internalPerformVerb(context); |
| 531 } | 531 } |
| 532 | 532 |
| 533 Future<int> internalPerformVerb(VerbContext context) { | 533 Future<int> internalPerformVerb(VerbContext context) { |
| 534 return verb.action.perform(this, context); | 534 return verb.action.perform(this, context); |
| 535 } | 535 } |
| 536 } | 536 } |
| OLD | NEW |