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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>