nit.git
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 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>

9 years agotyping: add `AArrayExpr::element_mtype`
Jean Privat [Wed, 17 Dec 2014 16:45:42 +0000 (11:45 -0500)]
typing: add `AArrayExpr::element_mtype`

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

9 years agoparser: regenerate with comprehension arrays
Jean Privat [Wed, 17 Dec 2014 10:38:34 +0000 (05:38 -0500)]
parser: regenerate with comprehension arrays

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

9 years agogrammar: extends array_item to accept array extension elements
Jean Privat [Wed, 17 Dec 2014 10:28:34 +0000 (05:28 -0500)]
grammar: extends array_item to accept array extension elements

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

9 years agogrammar: new production `array_items` to replace arg_list for literal arrays
Jean Privat [Wed, 17 Dec 2014 10:24:43 +0000 (05:24 -0500)]
grammar: new production `array_items` to replace arg_list for literal arrays

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

9 years agolib/github: introduces object oriented interface for GithubAPI
Alexandre Terrasa [Wed, 17 Dec 2014 20:12:23 +0000 (15:12 -0500)]
lib/github: introduces object oriented interface for GithubAPI

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

9 years agolib/github: introduces GithubCurl::get_and_parse to handle API error without aborting
Alexandre Terrasa [Mon, 15 Dec 2014 13:13:07 +0000 (08:13 -0500)]
lib/github: introduces GithubCurl::get_and_parse to handle API error without aborting

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

9 years agoneo_doxygen: Unlink `name` and `full_name`.
Jean-Christophe Beaupré [Wed, 17 Dec 2014 16:53:18 +0000 (11:53 -0500)]
neo_doxygen: Unlink `name` and `full_name`.

Also, remove `full_name` from the graph.

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

9 years agoMerge: Highlight line ids
Jean Privat [Wed, 17 Dec 2014 04:55:37 +0000 (23:55 -0500)]
Merge: Highlight line ids

Add a way to control the generation of HTML ids in `hightlight` so it can be disabled in nitdoc.
Multiple id `L1` in a same HTML document makes it non conform.

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

9 years agoMerge: Name entities
Jean Privat [Wed, 17 Dec 2014 04:55:22 +0000 (23:55 -0500)]
Merge: Name entities

As suggested in #986 and #1030, promote `full_name` and `c_name` in MEntity in model so client of the model will have some homogenous ways to names entities.

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

9 years agoMerge: Check constructor name conflicts
Jean Privat [Wed, 17 Dec 2014 04:55:15 +0000 (23:55 -0500)]
Merge: Check constructor name conflicts

Closes #973

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

9 years agoMerge: neo_doxygen: Clean the code a little bit
Jean Privat [Wed, 17 Dec 2014 04:54:53 +0000 (23:54 -0500)]
Merge: neo_doxygen: Clean the code a little bit

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

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

9 years agoMerge: brainfuck: Remove warnings.
Jean Privat [Wed, 17 Dec 2014 04:54:37 +0000 (23:54 -0500)]
Merge: brainfuck: Remove warnings.

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

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

9 years agoMerge: opportunity: Fix some warnings
Jean Privat [Wed, 17 Dec 2014 04:54:26 +0000 (23:54 -0500)]
Merge: opportunity: Fix some warnings

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

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

9 years agoMerge: Each line
Jean Privat [Wed, 17 Dec 2014 04:54:21 +0000 (23:54 -0500)]
Merge: Each line

Improve IStream and Path for easiness of reading.

First, add new iterator `each_line` that lazily `read_line` of a stream.

Second, wrap some reading methods on `Path` so that the input of data from files is really easy.

~~~nit
var content = "/etc/issue".to_path.read_all
print content
~~~

and

~~~nit
for l in "/etc/passwd".to_path.each_line do
   var fields = l.split(":")
   print "name={fields[0]} uid={fields[2]}"
end
~~~

TODO: better error management

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

9 years agoMerge: Fast docunits
Jean Privat [Wed, 17 Dec 2014 04:54:15 +0000 (23:54 -0500)]
Merge: Fast docunits

nitunit use the trick of #947 to optimize the execution of simple docunits.

There is now two execution modes: the *single* one and the *simple* one.

*simple* is for docunits that contains only some statements (without importation, classes or functions)
All *simple* docunits of a single module are regrouped into the same program with a switch that calls the correct docunit.

*single* is for docunits that contains importations, classes, functions, etc.
It the the old mode, that compiles and executes each docunit individually.

In case of compilation error with the *simple* mode, the *single* mode is used as a fallback.
Therefore the precise compilation error is assigned to the correct docunit and the other docunits can still be tested.

For numbers, I used `string` that contains 65 simple docunits:

* before: 1m16.564s
* after: 0m1.664s (so a gain of 97.80%)

Close #947

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

9 years agoMerge: contrib: download files from RSS
Jean Privat [Wed, 17 Dec 2014 04:54:09 +0000 (23:54 -0500)]
Merge: contrib: download files from RSS

Based on #831, ignore the first 4 commits.

### From the README

This tool downloads files pointed by RSS feeds.

It fetches the content of the RSS feed, the it filters it according to custom patterns and to existing folders on disk. Selected elements will be downloaded to the given folder.

This tool must be compiled with its configuration in order to work. See the `sample_config.nit` in `src/`.

#### Features and TODO

- [x] Download & parse RSS file
- [x] Generate regular expressions from local folders
- [x] Auto download files matching regular expressions
- [x] Memory to prevent double downloads
- [ ] Blacklist
- [ ] Use a cleaner RSS parser
- [ ] Tolerate more feed formats

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

9 years agomodel: promote `c_name` from abstract-compiler to model
Jean Privat [Tue, 16 Dec 2014 04:09:49 +0000 (23:09 -0500)]
model: promote `c_name` from abstract-compiler to model

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

9 years agomodel: add `full_name` to entities that miss one
Jean Privat [Tue, 16 Dec 2014 04:08:18 +0000 (23:08 -0500)]
model: add `full_name` to entities that miss one

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

9 years agomodel: promote `full_name` to MEntity
Jean Privat [Tue, 16 Dec 2014 04:05:32 +0000 (23:05 -0500)]
model: promote `full_name` to MEntity

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

9 years agolib/opts: do not crash for empty arguments
Jean Privat [Tue, 16 Dec 2014 19:10:32 +0000 (14:10 -0500)]
lib/opts: do not crash for empty arguments

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

9 years agoman: add --no-line-id to nitlight.md
Jean Privat [Tue, 16 Dec 2014 16:05:42 +0000 (11:05 -0500)]
man: add --no-line-id to nitlight.md

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

9 years agonitlight: add option --no-line-id
Jean Privat [Tue, 16 Dec 2014 16:04:48 +0000 (11:04 -0500)]
nitlight: add option --no-line-id

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

9 years agonitodoc: stop generating id for lines in examples
Jean Privat [Tue, 16 Dec 2014 13:57:53 +0000 (08:57 -0500)]
nitodoc: stop generating id for lines in examples

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

9 years agohighlight: add HighlightVisitor::line_id_prefix to control ids of line spans
Jean Privat [Tue, 16 Dec 2014 13:57:05 +0000 (08:57 -0500)]
highlight: add HighlightVisitor::line_id_prefix to control ids of line spans

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

9 years agotests: error_defs_init.nit for a combinasion of 7*7 cases
Jean Privat [Tue, 16 Dec 2014 21:21:14 +0000 (16:21 -0500)]
tests: error_defs_init.nit for a combinasion of 7*7 cases

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

9 years agomodelize: check property name conflicts for constructors and factories
Jean Privat [Tue, 16 Dec 2014 21:17:14 +0000 (16:17 -0500)]
modelize: check property name conflicts for constructors and factories

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

9 years agomodelize: check_redef_property_visibility for root_init
Jean Privat [Tue, 16 Dec 2014 21:16:38 +0000 (16:16 -0500)]
modelize: check_redef_property_visibility for root_init

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

9 years agolib/file: add examples for the new read methods in Path
Jean Privat [Tue, 16 Dec 2014 19:42:37 +0000 (14:42 -0500)]
lib/file: add examples for the new read methods in Path

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

9 years agoneo_doxygen: Make an instruction less verbose.
Jean-Christophe Beaupré [Tue, 16 Dec 2014 16:57:11 +0000 (11:57 -0500)]
neo_doxygen: Make an instruction less verbose.

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

9 years agoneo_doxygen: Do not manually flush the output.
Jean-Christophe Beaupré [Tue, 16 Dec 2014 16:56:24 +0000 (11:56 -0500)]
neo_doxygen: Do not manually flush the output.

The standard library now takes care of this for us.

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

9 years agolib/file: protect from double close
Jean Privat [Tue, 16 Dec 2014 10:46:25 +0000 (05:46 -0500)]
lib/file: protect from double close

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