nit.git
10 years agoMakefile: build nitls
Jean Privat [Tue, 18 Mar 2014 19:03:11 +0000 (15:03 -0400)]
Makefile: build nitls

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agotests: add nitls
Jean Privat [Tue, 18 Mar 2014 19:00:32 +0000 (15:00 -0400)]
tests: add nitls

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agosrc: new tool nitls
Jean Privat [Tue, 18 Mar 2014 18:59:40 +0000 (14:59 -0400)]
src: new tool nitls

Simple tool to list nit source files in directories.

The tool is really fast since it does not load files, just look at the
structure of files and directories.

There is a bunch of cool options, try it.

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agomodelbuilder: add `MGroup::module_paths` to store potential nit files
Jean Privat [Tue, 18 Mar 2014 18:44:51 +0000 (14:44 -0400)]
modelbuilder: add `MGroup::module_paths` to store potential nit files

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agomodelbuilder: `identify_file` works with directories and module names
Jean Privat [Tue, 18 Mar 2014 18:44:17 +0000 (14:44 -0400)]
modelbuilder: `identify_file` works with directories and module names

* `cvs` will get `../lib/csv.nit`
* `curl` will get `../lib/curl/curl.nit`
* `some/path/` could get `some/path/path.nit`

This enable some fun the the option `-m`:

    $ nitg someprog.nit -m android

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agomodelbuilder: extract `search_module_in_paths` from `get_mmodule_by_name`
Jean Privat [Tue, 18 Mar 2014 18:30:48 +0000 (14:30 -0400)]
modelbuilder: extract `search_module_in_paths` from `get_mmodule_by_name`

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agomodelbuilder: get_mmodule_by_name only output lookpaths instead of tries
Jean Privat [Tue, 18 Mar 2014 18:29:29 +0000 (14:29 -0400)]
modelbuilder: get_mmodule_by_name only output lookpaths instead of tries

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agolib/kernel: add `Bool::to_i`
Jean Privat [Tue, 18 Mar 2014 18:25:27 +0000 (14:25 -0400)]
lib/kernel: add `Bool::to_i`

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agoMerge branch 'streamable'
Jean Privat [Tue, 18 Mar 2014 16:58:18 +0000 (12:58 -0400)]
Merge branch 'streamable'

10 years agoMerge branch 'comparators'
Jean Privat [Tue, 18 Mar 2014 15:05:40 +0000 (11:05 -0400)]
Merge branch 'comparators'

10 years agoMerge branch 'file_string'
Jean Privat [Tue, 18 Mar 2014 15:05:25 +0000 (11:05 -0400)]
Merge branch 'file_string'

10 years agoMerge remote-tracking branch 'alexis/vim'
Jean Privat [Tue, 18 Mar 2014 15:05:07 +0000 (11:05 -0400)]
Merge remote-tracking branch 'alexis/vim'

10 years agolib/html: adapt HTMLPage & HTMLTag to Streamable
Jean Privat [Tue, 18 Mar 2014 15:03:58 +0000 (11:03 -0400)]
lib/html: adapt HTMLPage & HTMLTag to Streamable

And update clients to the new API

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agomisc: add support for FFI with Java and C++ to vim syntax
Alexis Laferrière [Sat, 15 Mar 2014 00:46:05 +0000 (20:46 -0400)]
misc: add support for FFI with Java and C++ to vim syntax

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agomisc: use nitc instead of nitg in syntastic
Alexis Laferrière [Sat, 15 Mar 2014 11:20:21 +0000 (07:20 -0400)]
misc: use nitc instead of nitg in syntastic

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agolib/file: fix border-use-cases of String::basename
Jean Privat [Fri, 14 Mar 2014 20:23:50 +0000 (16:23 -0400)]
lib/file: fix border-use-cases of String::basename

and add nitunit tests to improve documentation

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agolib/file: remove all trailing / on String::dirname
Jean Privat [Fri, 14 Mar 2014 20:22:19 +0000 (16:22 -0400)]
lib/file: remove all trailing / on String::dirname

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agoMerge remote-tracking branch 'alexis/lib-jvm'
Jean Privat [Fri, 14 Mar 2014 20:20:05 +0000 (16:20 -0400)]
Merge remote-tracking branch 'alexis/lib-jvm'

10 years agotests: modifies tests.sh to execute code using the jvm module
Romain Chanoir [Tue, 18 Feb 2014 15:02:45 +0000 (10:02 -0500)]
tests: modifies tests.sh to execute code using the jvm module

Signed-off-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agotests: intro tests for the jvm module
Romain Chanoir [Tue, 18 Feb 2014 15:18:20 +0000 (10:18 -0500)]
tests: intro tests for the jvm module

Signed-off-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>

10 years agolib: intro the jvm module
Romain Chanoir [Tue, 28 Jan 2014 16:07:22 +0000 (11:07 -0500)]
lib: intro the jvm module

Signed-off-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agoMerge branch 'test_platform'
Jean Privat [Fri, 14 Mar 2014 17:13:34 +0000 (13:13 -0400)]
Merge branch 'test_platform'

10 years agotests: add mnit linux examples
Jean Privat [Fri, 14 Mar 2014 15:20:23 +0000 (11:20 -0400)]
tests: add mnit linux examples

But no sav/ since runtime platform messages are platform dependent,
thus not reproducible.

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agomigration: use Comparator instead of Sorter in code
Jean Privat [Fri, 14 Mar 2014 01:41:55 +0000 (21:41 -0400)]
migration: use Comparator instead of Sorter in code

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agotests: add mnit android examples
Jean Privat [Fri, 14 Mar 2014 01:26:08 +0000 (21:26 -0400)]
tests: add mnit android examples

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agolib/ordered_tree: adapt OrderedTree to Streamable
Jean Privat [Fri, 14 Mar 2014 00:29:42 +0000 (20:29 -0400)]
lib/ordered_tree: adapt OrderedTree to Streamable

and update clients

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agolib/sorter: provide a stateless singleton `default_comparator`
Jean Privat [Fri, 14 Mar 2014 00:45:27 +0000 (20:45 -0400)]
lib/sorter: provide a stateless singleton `default_comparator`

This should prevent useless instantiations

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agolib/sorter: rename Sorter to Comparator
Jean Privat [Fri, 14 Mar 2014 00:44:19 +0000 (20:44 -0400)]
lib/sorter: rename Sorter to Comparator

Old names remain for compatibility.

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agomodel_viz: adapt MProjectDot to Streamable
Jean Privat [Thu, 13 Mar 2014 21:38:27 +0000 (17:38 -0400)]
model_viz: adapt MProjectDot to Streamable

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agolib/csv: adapt CSVDocument to the Streamable interface.
Jean Privat [Thu, 13 Mar 2014 20:03:52 +0000 (16:03 -0400)]
lib/csv: adapt CSVDocument to the Streamable interface.

Also improve the efficiency of the writing implementation.

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agolib: move `Template::write_to_*` to `Streamable`
Jean Privat [Thu, 13 Mar 2014 12:56:42 +0000 (08:56 -0400)]
lib: move `Template::write_to_*` to `Streamable`

Their implementation only depends on `write_to` that is introduced
in Streamable

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agotests: add basic platform management
Jean Privat [Thu, 13 Mar 2014 21:29:48 +0000 (17:29 -0400)]
tests: add basic platform management

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agoMerge remote-tracking branch 'alexis/much-more-android'
Jean Privat [Thu, 13 Mar 2014 19:47:44 +0000 (15:47 -0400)]
Merge remote-tracking branch 'alexis/much-more-android'

Fixes #334

10 years agolib: add doc to Passwd properties
Alexis Laferrière [Thu, 13 Mar 2014 14:33:34 +0000 (10:33 -0400)]
lib: add doc to Passwd properties

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agoexamples: simplify Makefiles of mnit examples
Alexis Laferrière [Wed, 12 Mar 2014 20:18:42 +0000 (16:18 -0400)]
examples: simplify Makefiles of mnit examples

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agolib: move Passwd::gecos to a new posix_ext module
Alexis Laferrière [Wed, 12 Mar 2014 20:11:57 +0000 (16:11 -0400)]
lib: move Passwd::gecos to a new posix_ext module

The C function is only provided on some implementation of POSIX and
absent from any POSIX version.

See GNU man page of getpwnam #Conforming to.

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agolib: in Int::sqrt, use C sqrt function for double
Alexis Laferrière [Thu, 13 Mar 2014 16:09:24 +0000 (12:09 -0400)]
lib: in Int::sqrt, use C sqrt function for double

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agolib: remove broken Int::sin/cos
Alexis Laferrière [Wed, 12 Mar 2014 19:59:01 +0000 (15:59 -0400)]
lib: remove broken Int::sin/cos

Not only these functions weren't available on Android, but their
usage was invalid.

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agoMerge branch 'dump_rta'
Jean Privat [Thu, 13 Mar 2014 12:37:28 +0000 (08:37 -0400)]
Merge branch 'dump_rta'

10 years agodoc: modified comment for typing::AExpr::mtype
Alexandre Terrasa [Thu, 13 Mar 2014 04:21:35 +0000 (21:21 -0700)]
doc: modified comment for typing::AExpr::mtype

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

10 years agometrics/rta: save the list of live things in files
Jean Privat [Wed, 12 Mar 2014 17:44:07 +0000 (13:44 -0400)]
metrics/rta: save the list of live things in files

Simply use `live_types_to_csv` and `live_methods_to_tree` to produce
two files in the correct output directory.

This helps the debugging of engines when RTA is buggy or misused.

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agoMerge remote-tracking branch 'alexis/even-more-android'
Jean Privat [Wed, 12 Mar 2014 22:24:48 +0000 (18:24 -0400)]
Merge remote-tracking branch 'alexis/even-more-android'

10 years agonitg: do not use libunwind for platforms which do not support it
Alexis Laferrière [Wed, 12 Mar 2014 19:56:27 +0000 (15:56 -0400)]
nitg: do not use libunwind for platforms which do not support it

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agonitg/android: lock orientation of Android applications
Alexis Laferrière [Wed, 12 Mar 2014 19:01:26 +0000 (15:01 -0400)]
nitg/android: lock orientation of Android applications

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agolib/mnit_android: use AndroidMotionEvent::action to get the pressed state
Alexis Laferrière [Wed, 12 Mar 2014 15:03:57 +0000 (11:03 -0400)]
lib/mnit_android: use AndroidMotionEvent::action to get the pressed state

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agolib/mnit_android: intro AndroidMotionEvent::action
Alexis Laferrière [Wed, 12 Mar 2014 15:03:35 +0000 (11:03 -0400)]
lib/mnit_android: intro AndroidMotionEvent::action

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agolib/mnit_android: correctly implement and use the generate_input method
Alexis Laferrière [Mon, 10 Mar 2014 18:43:26 +0000 (14:43 -0400)]
lib/mnit_android: correctly implement and use the generate_input method

This method was previously not implemented for Android.

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agolib/mnit_android: inverse importation of app and opengles1
Alexis Laferrière [Tue, 11 Mar 2014 13:49:24 +0000 (09:49 -0400)]
lib/mnit_android: inverse importation of app and opengles1

Fix warnings of LOGW/I.

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agolib/mnit_linux: replace calls to LOGI/LOGW with fprintf
Alexis Laferrière [Tue, 11 Mar 2014 13:48:55 +0000 (09:48 -0400)]
lib/mnit_linux: replace calls to LOGI/LOGW with fprintf

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agolib/mnit: less C warnings for LOGI/W
Alexis Laferrière [Tue, 11 Mar 2014 13:48:07 +0000 (09:48 -0400)]
lib/mnit: less C warnings for LOGI/W

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agoMerge branch 'metrics'
Jean Privat [Wed, 12 Mar 2014 18:20:50 +0000 (14:20 -0400)]
Merge branch 'metrics'

10 years agoMerge branch 'fix_module_owner_placebo'
Jean Privat [Wed, 12 Mar 2014 18:20:26 +0000 (14:20 -0400)]
Merge branch 'fix_module_owner_placebo'

10 years agorta: add `live_methods_to_tree` to provide human-readable infos on methods
Jean Privat [Wed, 12 Mar 2014 17:41:07 +0000 (13:41 -0400)]
rta: add `live_methods_to_tree` to provide human-readable infos on methods

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agorta: add `live_types_to_csv` to provide human-readable info on types
Jean Privat [Wed, 12 Mar 2014 17:18:31 +0000 (13:18 -0400)]
rta: add `live_types_to_csv` to provide human-readable info on types

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agomodel: fix module owner placebo
Jean Privat [Wed, 12 Mar 2014 16:07:28 +0000 (12:07 -0400)]
model: fix module owner placebo

nitdoc still rely on the old nesting hierarchy.
But the implementation of the placebo was buggy if a nested module is
loaded before its nesting module (because a wrongful usage of
`.mmodules.first`).

This patch has two small parts

* add a method `fuzzy_owner` to a MGroup (to replace the crazy
  `.mmodules.first`)
* a special case is added when a nesting module is loaded after some of
  its nested ones

Fix #324
Signed-off-by: Jean Privat <jean@pryen.org>

10 years agonitg: fix compilation of assets to apk
Alexis Laferrière [Mon, 10 Mar 2014 23:20:09 +0000 (19:20 -0400)]
nitg: fix compilation of assets to apk

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agolib/mnit_android: fix redef of Object::print
Alexis Laferrière [Mon, 10 Mar 2014 18:45:37 +0000 (14:45 -0400)]
lib/mnit_android: fix redef of Object::print

This old hack was revealed by the latest merge of FFI related PR.

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agoMerge remote-tracking branch 'alexis/a_star'
Jean Privat [Wed, 12 Mar 2014 15:29:47 +0000 (11:29 -0400)]
Merge remote-tracking branch 'alexis/a_star'

The type error was detected by nitg in complex cases.

10 years agolib/a_star: minor style cleanup
Alexis Laferrière [Tue, 11 Mar 2014 15:00:44 +0000 (11:00 -0400)]
lib/a_star: minor style cleanup

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agolib/a_star: fix use of virtual type in Node::path_to
Alexis Laferrière [Tue, 11 Mar 2014 15:00:06 +0000 (11:00 -0400)]
lib/a_star: fix use of virtual type in Node::path_to

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agotests: update nitmetrics stuff
Jean Privat [Wed, 12 Mar 2014 15:00:14 +0000 (11:00 -0400)]
tests: update nitmetrics stuff

Note: nobody saw it but there was a `Assert failed` in the previous sav file.

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agoMerge branch 'test_inputs'
Jean Privat [Wed, 12 Mar 2014 14:28:19 +0000 (10:28 -0400)]
Merge branch 'test_inputs'

10 years agotests: permit multiple inputs on a single test
Jean Privat [Wed, 12 Mar 2014 14:27:31 +0000 (10:27 -0400)]
tests: permit multiple inputs on a single test

Currently, for each program, if a `name.inputs` file exists, it is used for input for
all executions (for a total of alts * (args+1) executions).

Now a specific input can be used for each specific args.
This distinct input file is the one named with the basename of the res file.

eg. for the program `some_test.nit`, the file `some_test_args2.inputs` is
used as input for the execution associated to the second
line of the `some_test.args` file.
The result of the execution is still `some_test_args2.res`.

If there is no specific inputs file, the previous behavior remains:
`some_test.inputs` is used if it exists, else `/dev/null` is used.

The point of this patch is to enable specific CLI interactive programs,
like the debugger or nitx, to have automatizable regression tests.

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agoMerge branch 'debug_require'
Jean Privat [Wed, 12 Mar 2014 14:25:42 +0000 (10:25 -0400)]
Merge branch 'debug_require'

10 years agonitmetrics: do not crash in `to_console` if no values to present
Jean Privat [Wed, 12 Mar 2014 13:58:33 +0000 (09:58 -0400)]
nitmetrics: do not crash in `to_console` if no values to present

The crash occurs since `max` and `min` assert that `not values.is_empty`.

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agomodelviz: filter out modules without groups to avoid NPE error
Jean Privat [Wed, 12 Mar 2014 13:56:50 +0000 (09:56 -0400)]
modelviz: filter out modules without groups to avoid NPE error

These modules without groups are injected one or implicit bottom modules.

Now `nitmetrics m1.nit m2.nit --all` do not crash.

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agomodel_viz: remove `AlphaComparator`&cie. since thez are now in standard
Jean Privat [Tue, 11 Mar 2014 20:20:54 +0000 (16:20 -0400)]
model_viz: remove `AlphaComparator`&cie. since thez are now in standard

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agolib/string: provide `alpha_comparator` and `CachedAlphaComparator`
Jean Privat [Tue, 11 Mar 2014 20:06:13 +0000 (16:06 -0400)]
lib/string: provide `alpha_comparator` and `CachedAlphaComparator`

Sorting alphanumerically has never been so easy.

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agoabstract_compiler: show who require a declaration when not fulfilled
Jean Privat [Tue, 11 Mar 2014 19:09:23 +0000 (15:09 -0400)]
abstract_compiler: show who require a declaration when not fulfilled

~~~
No provided declaration for SOME_strage_symbol
aborted
~~~

is not the best error message when developing the compiler.

This patch attach node to requirements, so the origin of the request
can be shown on error.

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agoMerge branch 'has_supercall'
Jean Privat [Tue, 11 Mar 2014 18:23:56 +0000 (14:23 -0400)]
Merge branch 'has_supercall'

10 years agosrc: use `ASuperExpr::mpropdef` instead of asking the frame or visitors
Jean Privat [Tue, 11 Mar 2014 18:15:12 +0000 (14:15 -0400)]
src: use `ASuperExpr::mpropdef` instead of asking the frame or visitors

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agotyping: add `ASuperExpr::mpropdef` to stores the called super-property
Jean Privat [Tue, 11 Mar 2014 18:13:51 +0000 (14:13 -0400)]
typing: add `ASuperExpr::mpropdef` to stores the called super-property

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agosrc: suppr. collect_super_sends module
Jean Privat [Tue, 11 Mar 2014 17:42:01 +0000 (13:42 -0400)]
src: suppr. collect_super_sends module

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agonitgs: use `MPorpDef::has_supercall` insead of collect_super_sends
Jean Privat [Tue, 11 Mar 2014 17:41:04 +0000 (13:41 -0400)]
nitgs: use `MPorpDef::has_supercall` insead of collect_super_sends

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agoffi: ASuperExternCall set mpropdef.has_supercall as true
Jean Privat [Tue, 11 Mar 2014 17:40:16 +0000 (13:40 -0400)]
ffi: ASuperExternCall set mpropdef.has_supercall as true

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agofrontend: move `MPropDef::has_supercall` to `modelize_property`
Jean Privat [Tue, 11 Mar 2014 17:17:16 +0000 (13:17 -0400)]
frontend: move `MPropDef::has_supercall` to `modelize_property`

new init will add implicit super-calls, so the flag that inform
post-frontend phases that a `super` call is required must
be more accessible.

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agoMerge branch 'templates'
Jean Privat [Mon, 10 Mar 2014 23:43:42 +0000 (19:43 -0400)]
Merge branch 'templates'

10 years agoMerge branch 'tests'
Jean Privat [Mon, 10 Mar 2014 20:28:36 +0000 (16:28 -0400)]
Merge branch 'tests'

10 years agotests: reuse legacy ffi for test_extern.nit
Jean Privat [Mon, 10 Mar 2014 16:53:53 +0000 (12:53 -0400)]
tests: reuse legacy ffi for test_extern.nit

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agoniti: add missing extern&intern methods on Char and Float
Jean Privat [Mon, 10 Mar 2014 15:45:50 +0000 (11:45 -0400)]
niti: add missing extern&intern methods on Char and Float

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agotests: add a lot of missing sav/ files
Jean Privat [Mon, 10 Mar 2014 15:35:41 +0000 (11:35 -0400)]
tests: add a lot of missing sav/ files

most are empty and from the lib/ directory

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agotests: cleanup .skip files from old stuff
Jean Privat [Mon, 10 Mar 2014 15:29:13 +0000 (11:29 -0400)]
tests: cleanup .skip files from old stuff

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agotests: *todo* and *fail* marked as skiped in the XML juint file
Jean Privat [Mon, 10 Mar 2014 15:12:06 +0000 (11:12 -0400)]
tests: *todo* and *fail* marked as skiped in the XML juint file

There is no way, in the JUnit format to distinguish between *expected
success* and *expected failure*.
But there is a distinction between *run* and *skipped* (shown as green and
yellow by Jenkins).
This hack overload the currently useless *skipped* status to mark expected
failure (todo and fixme).

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agosrc: remove now useless compiling_writer
Jean Privat [Mon, 10 Mar 2014 16:56:59 +0000 (12:56 -0400)]
src: remove now useless compiling_writer

If required, use lib/template instead

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agosrc/c_tools: use template instead of compiling_writer
Jean Privat [Mon, 10 Mar 2014 16:55:45 +0000 (12:55 -0400)]
src/c_tools: use template instead of compiling_writer

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agoMerge remote-tracking branch 'alexis/more-android'
Jean Privat [Mon, 10 Mar 2014 16:39:34 +0000 (12:39 -0400)]
Merge remote-tracking branch 'alexis/more-android'

* Adds the libPNG project to the share folder. This library is not available in the Android NDK and thus must be added to each generated apk.
* Adds the Android mnit implementation
* Improves nitg compilation for Android to support mnit projects
* Update the mnit examples with their Android version
* Play Hunted Dino on Android!

10 years agoNOTICE: updated with info of the libpng project
Alexis Laferrière [Sat, 8 Mar 2014 03:16:34 +0000 (22:16 -0500)]
NOTICE: updated with info of the libpng project

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agoMerge branch 'templates'
Jean Privat [Mon, 10 Mar 2014 15:16:38 +0000 (11:16 -0400)]
Merge branch 'templates'

simple but efficient template system

10 years agoexample: add an example for lib/template
Jean Privat [Mon, 10 Mar 2014 14:36:36 +0000 (10:36 -0400)]
example: add an example for lib/template

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agolib: add new module `template`
Jean Privat [Fri, 7 Mar 2014 19:48:16 +0000 (14:48 -0500)]
lib: add new module `template`

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agolib/stream: add Streamable interface
Jean Privat [Fri, 7 Mar 2014 19:34:50 +0000 (14:34 -0500)]
lib/stream: add Streamable interface

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agoMerge branch 'triple_quoted'
Jean Privat [Mon, 10 Mar 2014 14:33:54 +0000 (10:33 -0400)]
Merge branch 'triple_quoted'

10 years agovim: update syntax for strings
Jean Privat [Mon, 10 Mar 2014 13:42:46 +0000 (09:42 -0400)]
vim: update syntax for strings

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agotests: add string-related tests
Jean Privat [Mon, 10 Mar 2014 13:41:48 +0000 (09:41 -0400)]
tests: add string-related tests

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agoparser: regenerate for strings
Jean Privat [Mon, 10 Mar 2014 14:32:11 +0000 (10:32 -0400)]
parser: regenerate for strings

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agosyntax: enable empty expression-expansion in super-strings
Jean Privat [Mon, 10 Mar 2014 13:40:41 +0000 (09:40 -0400)]
syntax: enable empty expression-expansion in super-strings

Allows `"a{}b"` to be `"ab"`, ie with an empty expansion in the body.

The point of this commit is to allow line-breaks or comments in strings

~~~
print "this {
      }is a { # some comment
      }string"
~~~
outputs "this is a string"

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agosyntax: allows trailing " and { in triple quoted strings
Jean Privat [Mon, 10 Mar 2014 13:30:21 +0000 (09:30 -0400)]
syntax: allows trailing " and { in triple quoted strings

Previously, the 3 first " where the start
and what followed the content until 3 other "

therefore `""""x"""` is the 2 char string `"x`;
but `"""x""""` was illegal (a single x followed by a un-terminated string)

This commit make long string end at a sequence of 3 or more " but considers
only the last 3 to be the end token.

Now, `"""x""""` is legal and is the 2 character string `x"`

Last example:

~~~
print """"""""" # output 3 characters: """
~~~

Signed-off-by: Jean Privat <jean@pryen.org>

10 years agoexample: update mnit examples with android version
Alexis Laferrière [Sun, 9 Feb 2014 14:37:01 +0000 (09:37 -0500)]
example: update mnit examples with android version

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agonitg/android: move generate apk file (with -o or locally)
Alexis Laferrière [Fri, 7 Mar 2014 22:16:37 +0000 (17:16 -0500)]
nitg/android: move generate apk file (with -o or locally)

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

10 years agonitg/android: load assets on the APK
Alexis Laferrière [Sun, 2 Mar 2014 12:34:14 +0000 (07:34 -0500)]
nitg/android: load assets on the APK

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>