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

Unified Diff: packages/petitparser/lib/lisp.dart

Issue 1400473008: Roll Observatory packages and add a roll script (Closed) Base URL: git@github.com:dart-lang/observatory_pub_packages.git@master
Patch Set: Created 5 years, 2 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 | « packages/petitparser/lib/json.dart ('k') | packages/petitparser/lib/petitparser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packages/petitparser/lib/lisp.dart
diff --git a/petitparser/lib/lisp.dart b/packages/petitparser/lib/lisp.dart
similarity index 67%
rename from petitparser/lib/lisp.dart
rename to packages/petitparser/lib/lisp.dart
index 4bcd5a3996294541fd8793002b028216925ab90e..6f239962b95f10c3b184f89877671d8b28c376be 100644
--- a/petitparser/lib/lisp.dart
+++ b/packages/petitparser/lib/lisp.dart
@@ -1,13 +1,11 @@
-/**
- * This package contains a simple grammar and evaluator for LISP.
- *
- * The code is reasonably complete to run and evaluate reasonably complex
- * programs from the console and from the web browser.
- */
-library lisp;
+/// This package contains a simple grammar and evaluator for LISP.
+///
+/// The code is reasonably complete to run and evaluate reasonably complex
+/// programs from the console and from the web browser.
+library petitparser.lisp;
import 'dart:collection';
-import 'package:petitparser/petitparser.dart';
+import 'petitparser.dart';
part 'src/lisp/cons.dart';
part 'src/lisp/environment.dart';
@@ -17,10 +15,10 @@ part 'src/lisp/natives.dart';
part 'src/lisp/parser.dart';
part 'src/lisp/standard.dart';
-/** The standard lisp parser definition. */
+/// The standard lisp parser definition.
final lispParser = new LispParser();
-/** The evaluation function. */
+/// The evaluation function.
eval(Environment env, expr) {
if (expr is Cons) {
return eval(env, expr.head)(env, expr.tail);
@@ -31,7 +29,7 @@ eval(Environment env, expr) {
}
}
-/** Evaluate a cons of instructions. */
+/// Evaluate a cons of instructions.
evalList(Environment env, expr) {
var result = null;
while (expr is Cons) {
@@ -41,7 +39,7 @@ evalList(Environment env, expr) {
return result;
}
-/** The arguments evaluation function. */
+/// The arguments evaluation function.
evalArguments(Environment env, args) {
if (args is Cons) {
return new Cons(eval(env, args.head), evalArguments(env, args.tail));
@@ -50,7 +48,7 @@ evalArguments(Environment env, args) {
}
}
-/** Reads and evaluates a [script]. */
+/// Reads and evaluates a [script].
evalString(Parser parser, Environment env, String script) {
var result = null;
for (var cell in parser.parse(script).value) {
« no previous file with comments | « packages/petitparser/lib/json.dart ('k') | packages/petitparser/lib/petitparser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698