nit.git
9 years agocompiler: move compilation stuff from modelbuilder to the compiler
Jean Privat [Sat, 27 Dec 2014 03:43:00 +0000 (22:43 -0500)]
compiler: move compilation stuff from modelbuilder to the compiler

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

9 years agocompiler: do not crash on fallback ffi with `extern` without a string
Jean Privat [Sat, 27 Dec 2014 03:34:38 +0000 (22:34 -0500)]
compiler: do not crash on fallback ffi with `extern` without a string

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

9 years agoMerge: neo_doxygen: Enhance description handling
Jean Privat [Thu, 25 Dec 2014 02:42:46 +0000 (21:42 -0500)]
Merge: neo_doxygen: Enhance description handling

* Document the implicit nodes.
* Prepare `DocListener` for translation of the Doxygen’s markup. #1059 must be fixed before we do anything else.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

Pull-Request: #1060
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>

9 years agoMerge: lib/socket: fix, update style and intro features
Jean Privat [Wed, 24 Dec 2014 01:22:16 +0000 (20:22 -0500)]
Merge: lib/socket: fix, update style and intro features

This is a pretty big update to the `socket` module. It appeared to be broken. Did someone test it since the last modifications to streams and read_line?

* Update and cleanup the style in the first 3 or 4 commits.
* Fix (some of) what was broken.
* Revamp the API with a distinction between listening sockets and stream sockets (making it closer to Ruby and C#). This is the most important commit "lib/socket: distinguish `TCPServer` from `TCPStream`".
* Intro additionnal features used by Mineit: non-blocking `TCPServer` sockets and `TCPStream::flush`.

Still to do:
* Add `Error` support to the API.
* Rename `socket_c` to `native_socket`.
* Fix `SocketObserver` and underlying C implementation.

Pull-Request: #1063
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agolib/socket: update socket clients
Alexis Laferrière [Mon, 22 Dec 2014 16:27:38 +0000 (11:27 -0500)]
lib/socket: update socket clients

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

9 years agolib/socket: add an easier server example
Alexis Laferrière [Mon, 22 Dec 2014 04:40:04 +0000 (23:40 -0500)]
lib/socket: add an easier server example

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

9 years agolib/socket: update examples to the latest API
Alexis Laferrière [Mon, 22 Dec 2014 03:38:18 +0000 (22:38 -0500)]
lib/socket: update examples to the latest API

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

9 years agolib/socket: minimal update to `SocketObserver` API and note some problems
Alexis Laferrière [Mon, 22 Dec 2014 03:37:50 +0000 (22:37 -0500)]
lib/socket: minimal update to `SocketObserver` API and note some problems

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

9 years agolib/socket: intro `flush` and `blocking=`
Alexis Laferrière [Mon, 22 Dec 2014 02:42:32 +0000 (21:42 -0500)]
lib/socket: intro `flush` and `blocking=`

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

9 years agolib/socket: distinguish `TCPServer` from `TCPStream`
Alexis Laferrière [Mon, 22 Dec 2014 02:42:10 +0000 (21:42 -0500)]
lib/socket: distinguish `TCPServer` from `TCPStream`

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

9 years agoMerge: neo_doxygen: location does not need noe4j
Jean Privat [Tue, 23 Dec 2014 02:39:46 +0000 (21:39 -0500)]
Merge: neo_doxygen: location does not need noe4j

Found this while investigating #936 with @xymus

Pull-Request: #1061
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>

9 years agoMerge: More no warning
Jean Privat [Tue, 23 Dec 2014 02:39:40 +0000 (21:39 -0500)]
Merge: More no warning

* process no_wargning before analysing classes
* test_suites are automatically no_warning("missing-doc")
* add no_warning in generated files

Pull-Request: #1058
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>

9 years agolib/socket: intro `NativeSocket::non_blocking` and `tcp_nodelay`
Alexis Laferrière [Mon, 22 Dec 2014 02:38:14 +0000 (21:38 -0500)]
lib/socket: intro `NativeSocket::non_blocking` and `tcp_nodelay`

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

9 years agolib/socket: clean up `native_accept` to better manage failed accept
Alexis Laferrière [Mon, 22 Dec 2014 02:36:28 +0000 (21:36 -0500)]
lib/socket: clean up `native_accept` to better manage failed accept

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

9 years agolib/socket: replace `NativeSocketAcceptResult` by a Nit class
Alexis Laferrière [Mon, 22 Dec 2014 02:33:43 +0000 (21:33 -0500)]
lib/socket: replace `NativeSocketAcceptResult` by a Nit class

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

9 years agolib/socket: rename prefix `FF` to `Native` per latest best practices
Alexis Laferrière [Sun, 21 Dec 2014 16:04:36 +0000 (11:04 -0500)]
lib/socket: rename prefix `FF` to `Native` per latest best practices

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

9 years agolib/socket: update style of the native module & move comments to doc
Alexis Laferrière [Sun, 21 Dec 2014 15:57:26 +0000 (10:57 -0500)]
lib/socket: update style of the native module & move comments to doc

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

9 years agolib/socket: use standard type names instead of local typedefs
Alexis Laferrière [Sun, 21 Dec 2014 15:47:03 +0000 (10:47 -0500)]
lib/socket: use standard type names instead of local typedefs

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

9 years agoneo_doxygen: Add an API to process description markup.
Jean-Christophe Beaupré [Fri, 19 Dec 2014 16:25:32 +0000 (11:25 -0500)]
neo_doxygen: Add an API to process description markup.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

9 years agohtml: Add missing documentation.
Jean-Christophe Beaupré [Sat, 20 Dec 2014 23:54:03 +0000 (18:54 -0500)]
html: Add missing documentation.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

9 years agoneo_doxygen: Add a section about brief descriptions in the `README`.
Jean-Christophe Beaupré [Thu, 18 Dec 2014 15:51:37 +0000 (10:51 -0500)]
neo_doxygen: Add a section about brief descriptions in the `README`.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

9 years agoneo_doxygen: Add a class to manage brief descriptions.
Jean-Christophe Beaupré [Sat, 20 Dec 2014 23:52:59 +0000 (18:52 -0500)]
neo_doxygen: Add a class to manage brief descriptions.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

9 years agoneo_doxygen: Enable `JAVADOC_AUTOBRIEF` on Java tests.
Jean-Christophe Beaupré [Fri, 19 Dec 2014 00:01:41 +0000 (19:01 -0500)]
neo_doxygen: Enable `JAVADOC_AUTOBRIEF` on Java tests.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

9 years agoneo_doxygen: Rename the `doc` module.
Jean-Christophe Beaupré [Thu, 18 Dec 2014 20:51:47 +0000 (15:51 -0500)]
neo_doxygen: Rename the `doc` module.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

9 years agoneo_doxygen: Document implicit classes.
Jean-Christophe Beaupré [Sat, 20 Dec 2014 17:31:31 +0000 (12:31 -0500)]
neo_doxygen: Document implicit classes.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

9 years agoneo_doxygen: Document modules.
Jean-Christophe Beaupré [Sun, 21 Dec 2014 03:44:08 +0000 (22:44 -0500)]
neo_doxygen: Document modules.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

9 years agoneo_doxygen: location does not need noe4j
Jean Privat [Sat, 20 Dec 2014 20:35:40 +0000 (15:35 -0500)]
neo_doxygen: location does not need noe4j

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

9 years agojson: regenerate with new `no_warning`
Jean Privat [Sat, 20 Dec 2014 14:24:31 +0000 (09:24 -0500)]
json: regenerate with new `no_warning`

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

9 years agoffi: fix phase dependencies
Jean Privat [Sat, 20 Dec 2014 14:24:08 +0000 (09:24 -0500)]
ffi: fix phase dependencies

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

9 years agonitcc: add `no_warning` when generating files
Jean Privat [Sat, 20 Dec 2014 14:11:33 +0000 (09:11 -0500)]
nitcc: add `no_warning` when generating files

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

9 years agopep8analysis: add `no_warning` to generated files
Jean Privat [Sat, 20 Dec 2014 13:51:58 +0000 (08:51 -0500)]
pep8analysis: add `no_warning` to generated files

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

9 years agono_warning: automatically disable `missing-doc` on test_suites
Jean Privat [Sat, 20 Dec 2014 13:46:55 +0000 (08:46 -0500)]
no_warning: automatically disable `missing-doc` on test_suites

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

9 years agofrontend: handle no-warnings before starting a modelize phase
Jean Privat [Sat, 20 Dec 2014 13:46:05 +0000 (08:46 -0500)]
frontend: handle no-warnings before starting a modelize phase

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

9 years agoMerge: lib/json: introduces collection management in JsonStore.
Jean Privat [Sat, 20 Dec 2014 03:24:45 +0000 (22:24 -0500)]
Merge: lib/json: introduces collection management in JsonStore.

Also improve the documentation.

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

Pull-Request: #1055
Reviewed-by: Jean Privat <jean@pryen.org>

9 years agoMerge: GitHub API: handles branches and commits
Jean Privat [Sat, 20 Dec 2014 03:24:39 +0000 (22:24 -0500)]
Merge: GitHub API: handles branches and commits

Github API learns to retrieve commits and branches.

Pull-Request: #1054
Reviewed-by: Jean Privat <jean@pryen.org>

9 years agoMerge: More documentation in src
Jean Privat [Sat, 20 Dec 2014 03:24:28 +0000 (22:24 -0500)]
Merge: More documentation in src

A lot a documentation, especially in the AST

Pull-Request: #1050
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>

9 years agoMerge: nitdoc: Always escape
Jean Privat [Sat, 20 Dec 2014 01:24:39 +0000 (20:24 -0500)]
Merge: nitdoc: Always escape

Finally fix #891.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

Pull-Request: #1053
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>

9 years agoMerge: nitdoc: Always use `mdoc_or_fallback`.
Jean Privat [Sat, 20 Dec 2014 01:24:37 +0000 (20:24 -0500)]
Merge: nitdoc: Always use `mdoc_or_fallback`.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

Pull-Request: #1052
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>

9 years agoMerge: Activate VM
Jean Privat [Sat, 20 Dec 2014 01:24:32 +0000 (20:24 -0500)]
Merge: Activate VM

Add option `--vm` to `nit` that allows users (and jenkins) to run the VM from bin/

@jpages c'est pour toi!

Pull-Request: #1051
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>

9 years agoMerge: Locally disable warnings
Jean Privat [Sat, 20 Dec 2014 01:24:27 +0000 (20:24 -0500)]
Merge: Locally disable warnings

The new annotation `no_warning`, used in module, will disable specific (or all) warnings in the module.

~~~
module lexer is no_warning("missing-doc")
module parser is no_warning("missing-doc", "unread-variable")
module toto is no_warning("all")
~~~

Note: Now there is less noise, a future PR (currently in writing) will remove a lot of warnings in the `src/` directory.

Close #774

Pull-Request: #1048
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agoMerge: neo_doxygen: Add some pythonic stuff
Jean Privat [Sat, 20 Dec 2014 01:24:23 +0000 (20:24 -0500)]
Merge: neo_doxygen: Add some pythonic stuff

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

Pull-Request: #1043
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>

9 years agolib/github: handles commits
Alexandre Terrasa [Fri, 19 Dec 2014 18:50:48 +0000 (13:50 -0500)]
lib/github: handles commits

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

9 years agolib/github: handles branches
Alexandre Terrasa [Fri, 19 Dec 2014 18:15:27 +0000 (13:15 -0500)]
lib/github: handles branches

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

9 years agosrc: finish documenting some module
Jean Privat [Sat, 20 Dec 2014 01:20:13 +0000 (20:20 -0500)]
src: finish documenting some module

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

9 years agoparser: document all properties of `parser_nodes`
Jean Privat [Fri, 19 Dec 2014 02:19:52 +0000 (21:19 -0500)]
parser: document all properties of `parser_nodes`

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

9 years agoparser: add some factorization classes in `parser_nodes`
Jean Privat [Fri, 19 Dec 2014 02:19:24 +0000 (21:19 -0500)]
parser: add some factorization classes in `parser_nodes`

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

9 years agolib/json: introduces collection management in JsonStore.
Alexandre Terrasa [Sat, 20 Dec 2014 01:07:57 +0000 (20:07 -0500)]
lib/json: introduces collection management in JsonStore.

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

9 years agolib/github: fixes GithubAPI::get documentation
Alexandre Terrasa [Fri, 19 Dec 2014 18:44:20 +0000 (13:44 -0500)]
lib/github: fixes GithubAPI::get documentation

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

9 years agonitdoc: Always escape names.
Jean-Christophe Beaupré [Fri, 12 Dec 2014 19:40:09 +0000 (14:40 -0500)]
nitdoc: Always escape names.

Fix #891.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

9 years agonitdoc: Escape modifiers.
Jean-Christophe Beaupré [Fri, 12 Dec 2014 19:33:53 +0000 (14:33 -0500)]
nitdoc: Escape modifiers.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

9 years agonitdoc: Escape links’ attributes.
Jean-Christophe Beaupré [Fri, 12 Dec 2014 19:22:29 +0000 (14:22 -0500)]
nitdoc: Escape links’ attributes.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

9 years agonitdoc: Escape page title.
Jean-Christophe Beaupré [Fri, 12 Dec 2014 19:21:06 +0000 (14:21 -0500)]
nitdoc: Escape page title.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

9 years agonitdoc: Factorize `nitdoc_name`.
Jean-Christophe Beaupré [Fri, 12 Dec 2014 19:34:58 +0000 (14:34 -0500)]
nitdoc: Factorize `nitdoc_name`.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

9 years agonitdoc: Always use `mdoc_or_fallback`.
Jean-Christophe Beaupré [Fri, 12 Dec 2014 19:32:24 +0000 (14:32 -0500)]
nitdoc: Always use `mdoc_or_fallback`.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

9 years agoneo_doxygen: Include a tip for Python in the `README`.
Jean-Christophe Beaupré [Wed, 17 Dec 2014 20:24:16 +0000 (15:24 -0500)]
neo_doxygen: Include a tip for Python in the `README`.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

9 years agoneo_doxygen: Add an option to remove the `def` keyword of Python.
Jean-Christophe Beaupré [Wed, 17 Dec 2014 20:18:24 +0000 (15:18 -0500)]
neo_doxygen: Add an option to remove the `def` keyword of Python.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

9 years agotests: add nitvm to testall.sh
Jean Privat [Fri, 19 Dec 2014 14:40:15 +0000 (09:40 -0500)]
tests: add nitvm to testall.sh

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

9 years agoman: add `--vm` to `nit.md`
Jean Privat [Fri, 19 Dec 2014 03:48:43 +0000 (22:48 -0500)]
man: add `--vm` to `nit.md`

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

9 years agotests: use `nit --vm` (thus available in bin/) for the engine `nitvm`
Jean Privat [Fri, 19 Dec 2014 03:45:34 +0000 (22:45 -0500)]
tests: use `nit --vm` (thus available in bin/) for the engine `nitvm`

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

9 years agotests: update nitvm.skip file
Jean Privat [Fri, 19 Dec 2014 03:42:41 +0000 (22:42 -0500)]
tests: update nitvm.skip file

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

9 years agonit: new experimental `--vm` option to run the vm
Jean Privat [Fri, 19 Dec 2014 03:42:00 +0000 (22:42 -0500)]
nit: new experimental `--vm` option to run the vm

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

9 years agovm: rename `run_naive_interpreter` as `run_virtual_machine`.
Jean Privat [Fri, 19 Dec 2014 03:41:27 +0000 (22:41 -0500)]
vm: rename `run_naive_interpreter` as `run_virtual_machine`.

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

9 years agoMerge: tests: `grep` in skip os is now silent
Jean Privat [Fri, 19 Dec 2014 03:08:28 +0000 (22:08 -0500)]
Merge: tests: `grep` in skip os is now silent

Pull-Request: #1046
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>

9 years agoMerge: neo4j: Remove the old `jsonable` library.
Jean Privat [Fri, 19 Dec 2014 03:08:18 +0000 (22:08 -0500)]
Merge: neo4j: Remove the old `jsonable` library.

That library is useless since PR #907.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

Pull-Request: #1045
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>

9 years agoMerge: Arrays comprehension
Jean Privat [Fri, 19 Dec 2014 03:07:20 +0000 (22:07 -0500)]
Merge: Arrays comprehension

Implements and closes #896

Was not as hard as expected, not bad for less than 12 hours of thinking, coding and sleeping.

Pull-Request: #1042
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agoparser: add `no_warning` in generated files to disable some warnings
Jean Privat [Thu, 18 Dec 2014 20:34:41 +0000 (15:34 -0500)]
parser: add `no_warning` in generated files to disable some warnings

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

9 years agofrontend: new phase and annotation `no_warning` to disable warning per module
Jean Privat [Thu, 18 Dec 2014 20:12:13 +0000 (15:12 -0500)]
frontend: new phase and annotation `no_warning` to disable warning per module

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

9 years agotoolcontext: enable blacklisting of warnings by source-file.
Jean Privat [Thu, 18 Dec 2014 20:10:17 +0000 (15:10 -0500)]
toolcontext: enable blacklisting of warnings by source-file.

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

9 years agoparser: promote `collect_X` from `parser_util`
Jean Privat [Thu, 18 Dec 2014 20:02:25 +0000 (15:02 -0500)]
parser: promote `collect_X` from `parser_util`

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

9 years agoparser_nodes: promote `get_annotation` and `AAnnotation::name` from `annotation`
Jean Privat [Thu, 18 Dec 2014 20:01:43 +0000 (15:01 -0500)]
parser_nodes: promote `get_annotation` and `AAnnotation::name` from `annotation`

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

9 years agoliteral: promote `as_X` from annotation
Jean Privat [Thu, 18 Dec 2014 20:00:23 +0000 (15:00 -0500)]
literal: promote `as_X` from annotation

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

9 years agotests: `grep` in skip os is now silent
Jean Privat [Thu, 18 Dec 2014 17:40:16 +0000 (12:40 -0500)]
tests: `grep` in skip os is now silent

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

9 years agoMerge: Nitcorn: fixes crash on bufferized inputs
Jean Privat [Thu, 18 Dec 2014 16:40:55 +0000 (11:40 -0500)]
Merge: Nitcorn: fixes crash on bufferized inputs

So... I'm not proud of this patch but it works so better this than nothing.

Partially fixes #1027 waiting for better.

Ping
@jpcaissy
@xymus

Pull-Request: #1031
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Jean-Philippe Caissy <jpcaissy@piji.ca>
Reviewed-by: Jean Privat <jean@pryen.org>

9 years agoMerge: lib/json: introduces json store a simple json data storage system.
Jean Privat [Thu, 18 Dec 2014 16:40:51 +0000 (11:40 -0500)]
Merge: lib/json: introduces json store a simple json data storage system.

Store and load json data.

This simple system can be used to store and retrieve json data.

## Usage

Create a new JsonStore or reuse an existing one.
~~~
var store = new JsonStore("store_dir")
~~~

JsonStore can store json of type JsonObject and JsonArray.
~~~
var color = "red"
var obj = new JsonObject
obj["color"] = name
obj["code"] = "FF0000"
~~~

Data are stored under a key.
~~~
var key = "colors/{name}"
~~~

Store the object.
~~~
store.store_object(key, obj)
assert store.has_key(key)
~~~

Load the object.
~~~
assert store.has_key(key)
var red = store.load_object(key)
assert res["name"] == name
~~~

Clear all stored data.
~~~
store.clear
~~~

*Copied from module documentation.*

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

Pull-Request: #1019
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Jean Privat <jean@pryen.org>

9 years agoMerge: nitdoc: Fix IDs
Jean Privat [Thu, 18 Dec 2014 16:40:46 +0000 (11:40 -0500)]
Merge: nitdoc: Fix IDs

Fix Nitdoc’s IDs to make them more robust and less redundant.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

Pull-Request: #1011
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Jean Privat <jean@pryen.org>

9 years agoMerge: GitHub api
Jean Privat [Thu, 18 Dec 2014 14:28:31 +0000 (09:28 -0500)]
Merge: GitHub api

Première PR d'une pas si longue série.

Juste histoire de montrer un aperçu du fonctionnement.

Please review only the last two commits.

Pull-Request: #1016
Reviewed-by: Jean Privat <jean@pryen.org>

9 years agonitdoc: Avoid HTML ID collisions.
Jean-Christophe Beaupré [Fri, 12 Dec 2014 19:40:38 +0000 (14:40 -0500)]
nitdoc: Avoid HTML ID collisions.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

9 years agonitdoc: Shorten redundant IDs.
Jean-Christophe Beaupré [Tue, 16 Dec 2014 16:13:58 +0000 (11:13 -0500)]
nitdoc: Shorten redundant IDs.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

9 years agonitdoc: Remove the project’s name from the groups’ IDs.
Jean-Christophe Beaupré [Tue, 16 Dec 2014 16:12:56 +0000 (11:12 -0500)]
nitdoc: Remove the project’s name from the groups’ IDs.

A project is only a wrapper on a group.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

9 years agonitdoc: Mangle names in IDs.
Jean-Christophe Beaupré [Fri, 12 Dec 2014 20:40:39 +0000 (15:40 -0500)]
nitdoc: Mangle names in IDs.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

9 years agonitdoc: Document constraints on `nitdoc_id`.
Jean-Christophe Beaupré [Fri, 12 Dec 2014 19:07:15 +0000 (14:07 -0500)]
nitdoc: Document constraints on `nitdoc_id`.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

9 years agonitdoc: Use a fully qualified ID for classes.
Jean-Christophe Beaupré [Tue, 16 Dec 2014 16:11:00 +0000 (11:11 -0500)]
nitdoc: Use a fully qualified ID for classes.

Avoid conflict when two modules define two different classes with the
same name. This also permits to support classes generated implicitly by
`neo_doxygen`.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

9 years agonitdoc: Group non-Nit entities at the bottom of `doc_model.nit`.
Jean-Christophe Beaupré [Fri, 12 Dec 2014 14:38:01 +0000 (09:38 -0500)]
nitdoc: Group non-Nit entities at the bottom of `doc_model.nit`.

Follow the division indicated by the comments in this file.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

9 years agonitdoc: Fix a minor documentation mistake.
Jean-Christophe Beaupré [Fri, 12 Dec 2014 19:08:15 +0000 (14:08 -0500)]
nitdoc: Fix a minor documentation mistake.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

9 years agostring: Fix `to_cmangle` to never end with an underscore.
Jean-Christophe Beaupré [Fri, 12 Dec 2014 14:55:40 +0000 (09:55 -0500)]
string: Fix `to_cmangle` to never end with an underscore.

This permits to use two underscores as a separator between two mangled
names (like Nitdoc does).

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

9 years agostring: Fix `to_cmangle` to always produce valid C identifiers.
Jean-Christophe Beaupré [Sat, 13 Dec 2014 17:09:34 +0000 (12:09 -0500)]
string: Fix `to_cmangle` to always produce valid C identifiers.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

9 years agolib/json: introduces json store a simple json data storage system.
Alexandre Terrasa [Thu, 18 Dec 2014 13:44:55 +0000 (08:44 -0500)]
lib/json: introduces json store a simple json data storage system.

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

9 years agoMerge: Do not inline lazy getter
Jean Privat [Thu, 18 Dec 2014 01:15:00 +0000 (20:15 -0500)]
Merge: Do not inline lazy getter

nitc-sg's aggressive inlining caused a stack overflow during the compilation of recursive lazy attributes

Needed to pass #1011

Pull-Request: #1044

9 years agoMerge: neo: Remove `full_name`.
Jean Privat [Thu, 18 Dec 2014 01:14:31 +0000 (20:14 -0500)]
Merge: neo: Remove `full_name`.

This is not an attribute in the Nit model.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

Pull-Request: #1030
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>

9 years agoneo4j: Remove the old `jsonable` library.
Jean-Christophe Beaupré [Wed, 17 Dec 2014 21:34:28 +0000 (16:34 -0500)]
neo4j: Remove the old `jsonable` library.

That library is useless since PR #907.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

9 years agolib/nitcorn: handles bufferized request content
Alexandre Terrasa [Wed, 17 Dec 2014 21:05:13 +0000 (16:05 -0500)]
lib/nitcorn: handles bufferized request content

Partially fixes #1027

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

9 years agolib/nitcorn: allows access to POST raw body
Alexandre Terrasa [Wed, 17 Dec 2014 20:57:56 +0000 (15:57 -0500)]
lib/nitcorn: allows access to POST raw body

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

9 years agotests: add base_lazy3.nit
Jean Privat [Wed, 17 Dec 2014 20:43:10 +0000 (15:43 -0500)]
tests: add base_lazy3.nit

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

9 years agocompiler: do not inline lazy getters
Jean Privat [Wed, 17 Dec 2014 20:42:01 +0000 (15:42 -0500)]
compiler: do not inline lazy getters

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

9 years agotests: add test_comprehension.nit
Jean Privat [Wed, 17 Dec 2014 18:56:31 +0000 (13:56 -0500)]
tests: add test_comprehension.nit

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

9 years agotransform: transform array comprehension in simpler statements
Jean Privat [Wed, 17 Dec 2014 16:50:55 +0000 (11:50 -0500)]
transform: transform array comprehension in simpler statements

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

9 years agotransform: introduce `full_transform_visitor` for complex transformations
Jean Privat [Wed, 17 Dec 2014 16:50:04 +0000 (11:50 -0500)]
transform: introduce `full_transform_visitor` for complex transformations

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

9 years agonitg: handle direct compilation of comprehension arrays
Jean Privat [Wed, 17 Dec 2014 16:48:32 +0000 (11:48 -0500)]
nitg: handle direct compilation of comprehension arrays

Because of `transform`, it is only used if compiled
with `--disable-phase transform`

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

9 years agointerpreter: implements array comprehensions
Jean Privat [Wed, 17 Dec 2014 18:46:50 +0000 (13:46 -0500)]
interpreter: implements array comprehensions

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

9 years agotyping: mark expressions that belong to an array comprehension
Jean Privat [Wed, 17 Dec 2014 18:45:58 +0000 (13:45 -0500)]
typing: mark expressions that belong to an array comprehension

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