1
1
mirror of https://github.com/kanaka/mal.git synced 2024-09-19 17:47:53 +03:00
Commit Graph

45 Commits

Author SHA1 Message Date
Joel Martin
12793a708a rpython, swift3, wasm: detected unclosed strings.
Detect more cases where strings are unterminated.
2019-07-30 22:35:47 -05:00
Nicolas Boulenguez
e6d41de4d5 load-file: accept empty file or final comment, return nil
Let `load-file` append a new line in case last line contains a
comment.

Also append `nil` so that the return value is predictible. Remove the
existing explicit `nil` from existing sources.

Adapt documentation and tests.
2019-07-28 13:08:05 +02:00
Nicolas Boulenguez
26ced15b31 Remove gensym, inc and or from step files.
* Move `gensym` and `inc` from step files to `lib/trivial.mal`.
* Move `or` from step files to `lib/test_cascade.mal`.
  Shorten it because `(first ())` returns `nil`
* Update process and tests accordingly (not the figures yet).
2019-07-09 14:05:29 +02:00
Nicolas Boulenguez
14ab099cea gensym: hide the counter in an environment, define inc in stepA.
tests: check that `inc` is present in stepA.
nasm: split lines in mal_startup_string for readability.
objpascal: remove obsolete .orig file
swift: remove an unneeded line in template
swift4: remove duplicate definition of `or` macro
2019-05-11 16:37:26 +02:00
Joel Martin
90ca848565 rpython,rust,swift4,ts: fix empty list handling.
In these implementations there is no empty list check before
macroexpansion and so empty lists from step8 onwards produce a crash
or other misbehavior.

Also, add a test to step8 to test empty list again (first time it's
tested is in step2).
2019-05-07 16:43:12 -05:00
Joel Martin
c4269f9bf5 Convert to loccount based stats calculation. 2019-03-20 23:34:21 -05:00
Joel Martin
4aa0ebdf47 Error on unterminated strings.
Add a step1 test to make sure that implementations are properly
throwing an error on unclosed strings.

Fix 47 implementations and update the guide to note the correct
behavior.
2019-01-25 16:16:06 -06:00
Joel Martin
dd7a4f55f3 Test uncaught throw, catchless try* . Fix 46 impls.
Fixes made to: ada, c, chuck, clojure, coffee, common-lisp, cpp,
crystal, d, dart, elm, erlang, es6, factor, fsharp, gnu-smalltalk,
groovy, guile, haxe, hy, js, livescript, matlab, miniMAL, nasm, nim,
objc, objpascal, ocaml, perl, perl6, php, plsql, ps, python, r,
rpython, ruby, scheme, swift3, tcl, ts, vb, vimscript, wasm, yorick.

Catchless try* test is an optional test. Not all implementations
support catchless try* but a number were fixed so they at least don't
crash on catchless try*.
2018-12-12 14:18:26 -06:00
Joel Martin
2df92e0655 c, rpython, vhdl: add number?, fn?, and macro? 2017-10-11 21:18:50 -04:00
Joel Martin
42aecee642 Fix unescaping in cs, hy, nim, objpascal, ps, rpython, vb 2017-09-28 07:40:47 -05:00
Joel Martin
273226aa74 Fix unescaping in matlab, miniMAL and rpython. 2017-09-28 07:40:47 -05:00
Joel Martin
2c0c033bfc Go, Kotlin, Nim, ObjC, RPython: update Dockerfiles.
- Fix Nim IOError handling issue introduced by update.
2017-02-11 00:12:37 -06:00
Joel Martin
20e8dea043 Refactor to use run scripts, remove *_RUNSTEP
- Add */run script for every implementation.

- Refactor Clojure build to allow individual jar files for each step.

- Update FFI version for es6 and miniMAL to work with newer node
  versions.

The run scripts for the following could use some additional
refactoring:
- java: build individual step jar, use java -jar instead of mvn to run
- plpgsql: maybe combine plpgsql/run and plpgsql/wrap.sh
- vhdl: combine vhdl/run and vhdl/run_vhdl.sh
- vimscript: combine vimscript/run and vimscript/run_vimscript.sh
2016-05-18 22:29:18 -07:00
Joel Martin
efa2daef57 Fix empty list eval in step2 for most languages.
I think the only remaining ones are ada, elisp, factor, and rust.
2016-04-02 18:40:49 -05:00
Joel Martin
dca6b58578 Tests: move step5 non-TCO tests to per impl.
- Remove most of the step5 excludes in the Makefile except for ones
  which don't have TCO capability at all (or the implementation is too
  slow): bash, make, mal, matlab.

- Make perf_EXCLUDES consistent with other excludes.

- Add a print-FOO target which prints the resolved value of Makefile
  variable FOO. For example, `make print-IMPLS` to print the list of
  implementations.
2016-03-14 23:39:21 -05:00
Joel Martin
7233afd114 rpython: update Dockerfile to pypy-4.0.1 2016-03-14 22:29:13 -05:00
Joel Martin
9044b1fdb1 Merge branch 'master' into issue_166_string_ops 2016-02-24 12:00:08 -06:00
Joel Martin
5245b079e1 Add dist targets to most implementations.
TODO: factor groovy guile julia matlab miniMAL swift
2016-02-24 00:33:20 -06:00
Joel Martin
6791e640e1 haxe, matlab, miniMAL, python, rpython: add seq/string?
Issue #166.
2016-02-11 09:19:53 -06:00
Joel Martin
d5a3eb9454 rpython, matlab: fix first/rest on nil. 2016-02-03 12:22:29 -06:00
Joel Martin
44aef1f401 clojure, groovy, rpython, scala: fix macro result evaluation
Related to issue #142.

- also, fix groovy build dependency bug
2016-01-26 14:15:16 -06:00
Dov Murik
29ba1fb6c0 Add gensym and clean or macro to stepA of 19 implementations (part 3)
* awk
* cpp
* cs
* es6
* factor
* fsharp
* groovy
* haskell
* java
* julia
* kotlin
* matlab
* php
* r
* rpython
* rust
* scala
* swift
* vb
2016-01-25 16:30:54 -05:00
Joel Martin
6d3fc1be9a Fix hash-map equality in python and rpython. 2015-11-10 11:00:56 -06:00
Joel Martin
8d78bc26bf All: fix read/print of \\, and \n 2015-10-30 22:05:49 -05:00
Joel Martin
f15b4021db All: show comments with stats target.
- Put guile into correct alphabetical order.
2015-10-26 22:33:49 -05:00
Joel Martin
2c246d4882 Travis: better rpython Dockerfile. 2015-10-09 14:38:27 -05:00
Joel Martin
fdf80511d4 rpython: fix _cache, and update to pypy 2.7.0-alpha0
- also, enable rpython with Travis
2015-10-08 17:15:35 -05:00
Joel Martin
44571c102b Travis: fix coffee and es6
- coffee: install npm deps when built
- es6: create build directory
2015-10-07 23:32:45 -05:00
Joel Martin
fc4c7889cb Travis: add remaining implementations.
- new impls: awk, crystal, elixir, erlang, es6, fsharp, groovy, guile
  (disabled), rpython (disabled)
2015-10-07 21:46:12 -05:00
Joel Martin
23fa1b119c RPython: replace asserts with conditionals. 2015-06-11 09:33:12 -05:00
Joel Martin
ab02c5bb38 RPython: misc cleanup, step sync, stats target. 2015-06-11 09:33:12 -05:00
Joel Martin
7f7148043b RPython: self-hosting 2015-06-11 09:33:11 -05:00
Joel Martin
8855a05a15 RPython: add vector and hash-map support. 2015-06-11 09:33:11 -05:00
Joel Martin
11b4be9940 RPython: stepA basics. Makefile refactor. 2015-06-11 09:33:10 -05:00
Joel Martin
9be6d5a6fe RPython: step9 basics. 2015-06-11 09:33:10 -05:00
Joel Martin
c9fe67a85b RPython: step8 basics. 2015-06-11 09:33:10 -05:00
Joel Martin
0096b107a7 RPython: step7 2015-06-11 09:33:09 -05:00
Joel Martin
219f5239dc RPython: step6 basics. 2015-06-11 09:33:09 -05:00
Joel Martin
e0529eb2f3 RPython: step5 2015-06-11 09:33:09 -05:00
Joel Martin
b0a9121df8 RPython: step4 basics. 2015-06-11 09:33:08 -05:00
Joel Martin
e6cfacb4fa RPython: step3 basics. 2015-06-11 09:33:08 -05:00
Joel Martin
2dd89a96de RPython: step2 basics. 2015-06-11 09:33:08 -05:00
Joel Martin
f0cd131844 RPython: add keywords. Use unicode internally. 2015-06-11 09:33:07 -05:00
Joel Martin
80320efc47 RPython: step1 basics 2015-06-11 09:33:07 -05:00
Joel Martin
a751ce67ce RPython: step0 2015-06-11 09:33:07 -05:00