nit.git
8 years agovim: look for `{ in deciding to highlight ffi language name. eg "C".
Jean Privat [Fri, 8 May 2015 20:40:17 +0000 (16:40 -0400)]
vim: look for `{ in deciding to highlight ffi language name. eg "C".

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

8 years agoMerge: Nitdoc: some fixes and cleaning
Jean Privat [Fri, 8 May 2015 02:11:24 +0000 (22:11 -0400)]
Merge: Nitdoc: some fixes and cleaning

* Fixes the topmenu brand display
* Update bootstrap version to v3.3.4
* Avoid nesting of DefinitionArticle to facilitate tabular display (next PR)

Demos are ready: [stdlib](http://gresil.org/jenkins/job/CI-nitdoc/ws/doc/stdlib/index.html) [nitc](http://gresil.org/jenkins/job/CI-nitdoc/ws/doc/nitc/index.html)

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

8 years agoMerge: Fix calls on primitive receivers
Jean Privat [Fri, 8 May 2015 02:11:21 +0000 (22:11 -0400)]
Merge: Fix calls on primitive receivers

Fix #1301

Pull-Request: #1318
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>

8 years agotests: add base_primitive_recv.nit
Jean Privat [Thu, 7 May 2015 14:17:37 +0000 (10:17 -0400)]
tests: add base_primitive_recv.nit

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

8 years agocompiler: use `adapt_signature` to simplify and clean `table_send`
Jean Privat [Thu, 7 May 2015 14:11:40 +0000 (10:11 -0400)]
compiler: use `adapt_signature` to simplify and clean `table_send`

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

8 years agoMerge: Semicolumn
Jean Privat [Thu, 7 May 2015 01:56:10 +0000 (21:56 -0400)]
Merge: Semicolumn

Propose that `;` is usable as a hard line break. While this is not really nit-ish, the only need is in fact to be able to write short one-line scripts in environment where linefeeds are not an option.

~~~sh
$ ./nit -e 'for line in stdin.each_line do; var xs = line.split(":"); if xs.not_empty then print xs.first; end' < /etc/passwd
~~~

Pull-Request: #1305
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>

8 years agoMerge: Balanced brackets
Jean Privat [Thu, 7 May 2015 01:56:08 +0000 (21:56 -0400)]
Merge: Balanced brackets

The PR started as a simple implementation for the task http://rosettacode.org/wiki/Balanced_brackets but some improvements on the lib and tests.sh where also added

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

8 years agonitdoc: do not nest DefinitionArticle
Alexandre Terrasa [Fri, 24 Apr 2015 15:58:33 +0000 (11:58 -0400)]
nitdoc: do not nest DefinitionArticle

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

8 years agonitdoc: update bootstrap version
Alexandre Terrasa [Fri, 24 Apr 2015 15:50:42 +0000 (11:50 -0400)]
nitdoc: update bootstrap version

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

8 years agonitdoc: fixes double span on topmenu brand
Alexandre Terrasa [Fri, 24 Apr 2015 03:24:39 +0000 (23:24 -0400)]
nitdoc: fixes double span on topmenu brand

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

8 years agotests: update sav/nitunit_args6.res because `;` is no more a bad character
Jean Privat [Tue, 5 May 2015 19:23:33 +0000 (15:23 -0400)]
tests: update sav/nitunit_args6.res because `;` is no more a bad character

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

8 years agotests: add syntax_semi*.nit
Jean Privat [Mon, 4 May 2015 19:42:37 +0000 (15:42 -0400)]
tests: add syntax_semi*.nit

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

8 years agomisc_analysis: warn on superfluous `;`
Jean Privat [Wed, 6 May 2015 01:21:33 +0000 (21:21 -0400)]
misc_analysis: warn on superfluous `;`

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

8 years agoparser: regenerate
Jean Privat [Mon, 4 May 2015 19:27:28 +0000 (15:27 -0400)]
parser: regenerate

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

8 years agogrammar: distinguish `nd` for doc and `no` for optional eol
Jean Privat [Mon, 4 May 2015 19:26:18 +0000 (15:26 -0400)]
grammar: distinguish `nd` for doc and `no` for optional eol

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

8 years agogrammar: add `;` as an alternative hard line-break
Jean Privat [Mon, 4 May 2015 19:25:21 +0000 (15:25 -0400)]
grammar: add `;` as an alternative hard line-break

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

8 years agoMerge: nitdoc: migrate the DocPage rendering to composite rendering
Jean Privat [Wed, 6 May 2015 01:29:03 +0000 (21:29 -0400)]
Merge: nitdoc: migrate the DocPage rendering to composite rendering

Also delete old nitdoc components.

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

8 years agoexample/rosettacode: add task balanced_brackets
Jean Privat [Tue, 5 May 2015 18:27:57 +0000 (14:27 -0400)]
example/rosettacode: add task balanced_brackets

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

8 years agolib/math: add `Collection::to_shuffle` and `Array::shuffle`
Jean Privat [Tue, 5 May 2015 18:24:41 +0000 (14:24 -0400)]
lib/math: add `Collection::to_shuffle` and `Array::shuffle`

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

8 years agolib/math: nitunit `Collection::rand`
Jean Privat [Tue, 5 May 2015 18:23:57 +0000 (14:23 -0400)]
lib/math: nitunit `Collection::rand`

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

8 years agolib/mnit: remove `MNIT_SRAND` and use `NIT_SRAND` instead
Jean Privat [Tue, 5 May 2015 18:23:29 +0000 (14:23 -0400)]
lib/mnit: remove `MNIT_SRAND` and use `NIT_SRAND` instead

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

8 years agolib/standard: use `NIT_SRAND` envvar to control the random number generator
Jean Privat [Tue, 5 May 2015 18:22:53 +0000 (14:22 -0400)]
lib/standard: use `NIT_SRAND` envvar to control the random number generator

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

8 years agosrc/doc: fix anchor url following the rendering migration
Alexandre Terrasa [Fri, 24 Apr 2015 03:02:18 +0000 (23:02 -0400)]
src/doc: fix anchor url following the rendering migration

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

8 years agosrc/doc: clean old components
Alexandre Terrasa [Tue, 24 Feb 2015 13:47:04 +0000 (14:47 +0100)]
src/doc: clean old components

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

8 years agosrc/doc: migrate showsource links to new templates
Alexandre Terrasa [Tue, 24 Feb 2015 13:28:42 +0000 (14:28 +0100)]
src/doc: migrate showsource links to new templates

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

8 years agosrc/doc: move linearization list to `doc_phases`
Alexandre Terrasa [Tue, 24 Feb 2015 13:18:47 +0000 (14:18 +0100)]
src/doc: move linearization list to `doc_phases`

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

8 years agosrc/doc: migrate Index page rendering to `doc_phases`
Alexandre Terrasa [Tue, 24 Feb 2015 13:01:25 +0000 (14:01 +0100)]
src/doc: migrate Index page rendering to `doc_phases`

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

8 years agosrc/doc: migrate Overview page to `doc_phases`
Alexandre Terrasa [Tue, 24 Feb 2015 12:55:16 +0000 (13:55 +0100)]
src/doc: migrate Overview page to `doc_phases`

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

8 years agosrc/doc: move rendering from old templates to new phases
Alexandre Terrasa [Sat, 25 Apr 2015 13:34:33 +0000 (09:34 -0400)]
src/doc: move rendering from old templates to new phases

Next commits will do some fixups:
* redo showlinks
* redo Overview
* redo FullIndex page

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

8 years agosrc/doc: migrate sidebar custom lists to new templates
Alexandre Terrasa [Tue, 24 Feb 2015 13:43:42 +0000 (14:43 +0100)]
src/doc: migrate sidebar custom lists to new templates

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

8 years agosrc/doc: migrate sidebar to new templates
Alexandre Terrasa [Tue, 24 Feb 2015 01:15:23 +0000 (02:15 +0100)]
src/doc: migrate sidebar to new templates

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

8 years agoMerge: Prettier pretty printing
Jean Privat [Tue, 5 May 2015 01:10:25 +0000 (21:10 -0400)]
Merge: Prettier pretty printing

Some bugfixes, improvements and workaround for nitprettty.

The two options `--no-inline` and `--line-width` allow to control some rules about line-breaks.
This can be useful especially for people that want more relaxed rules.

~~~sh
$ ./nitpretty --check ../lib | wc -l
224
$ ./nitpretty --check ../lib --line-width 0 --no-inline | wc -l
188
~~~

So 36 more files are identical to their pretty printing with those relaxed rules.

For information, the tool crashed on some files in lib with the version before the PR.

Note that a lot of more work is still needed, one can see very strange and inconsistent results if the line width is forced to 1.

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

8 years agoMerge: Fix a bit of everything: typos, doc, android, bucketed_game and vim
Jean Privat [Tue, 5 May 2015 01:10:09 +0000 (21:10 -0400)]
Merge: Fix a bit of everything: typos, doc, android, bucketed_game and vim

Fix typos in doc and help, improve doc, fix error in Android projects, clean up bucketed_game and add an option for #1300.

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

8 years agoMerge: nitdoc: start using DocComponent rendering
Jean Privat [Tue, 5 May 2015 01:09:57 +0000 (21:09 -0400)]
Merge: nitdoc: start using DocComponent rendering

This PR starts the migration of HTML rendering from old components to new DocComposite rendering.

Some minor differences can be seen in the output.

Démos: [stdli](http://gresil.org/jenkins/job/CI-nitdoc/ws/doc/stdlib/index.html) and [nitc](http://gresil.org/jenkins/job/CI-nitdoc/ws/doc/nitc/index.html).

Pull-Request: #1299
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>

8 years agoMerge: Filereader fix
Jean Privat [Tue, 5 May 2015 01:09:50 +0000 (21:09 -0400)]
Merge: Filereader fix

Since 39fcf4a75aaec646f0b60d404dfcc5cb63dcb473 and because people prefer the Python/Ruby semantic to the C semantic, eof is blocking.

This PR rewrite `BufferedReader.read` to follow the Python/Ruby semantic: if there is 1 character in the system buffer, and that the programmer asks for 2, the program will wait to have 1 more character, that can block the whole program if we are waiting the missing character from some keyboard, pipe or tcp connection.

Here a comparaison of the various specifications:

The protocol is the following: I `read(4)` bytes from stdin and print them. On stdin, I write `ab\n` (3 bytes) then `cd\n` (3 other bytes) and see when the the read does Its job.
In the following, I only give the outputs since the input will be the same and adding it will require to distinguish them with the output.

~~~sh
$ ./nit_old -e 'print sys.stdin.read(4)'
a
~~~

WTF? Why only char `a` was printed? OK the implementation before the PR was more buggy than expected.

~~~sh
$ ./nit_new -e 'print sys.stdin.read(4)'
ab
c
~~~

As I expected, nothing is printed after the first `ab\n` because exactly 4 bytes are waited for, then printed. Thus we get `ab\nc`. The extra `d\n` are lost in the buffer of Nit.

~~~sh
$ ruby -e 'puts $stdin.read(4)'
ab
c
$ d
bash: d : commande introuvable
~~~

Same behavior with Ruby, so nothing is printed after the first `ab\n`.
Nice surprise however, the extra `d\n` are not lost but kept in system buffer, so still available (and read) when the shell take back the control. I am not really sure which behavior I prefer. The Ruby one might be saner from an OS point of view; but since I was surprised, one can assume that the POLA level is not that high.

~~~sh
$ python <(echo 'import sys;print(sys.stdin.read(4))')
ab
c
~~~

So exactly the same behavior than Nit with this PR.

Close #1264

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

8 years agoMerge: i18n annotation
Jean Privat [Tue, 5 May 2015 01:09:46 +0000 (21:09 -0400)]
Merge: i18n annotation

So here's the POC of a new annotation for the compiler: i18n !

Right now, you can append it to a module declaration with the locale of your choice.

It then generates a .pot template file and a .po file for the language you chose when defining your module.

The generation of the corresponding .mo (using msgfmt) file is still of the responsability of the user.

There's still several modifications to do for real usability, namely the support of superstrings, the possibility to untranslate a literal string via some kind of notranslate annotation (though if no translation is found, the key is kept as argument, so this should not be an issue).

So now, when using another value for the $LANGUAGE environment value, a different message will be printed when executing a Nit program, have fun !

NOTE: I have not yet added a test since I'm not sure how we should proceed. I guess we could just try to generate a .po file and .mo file for the example with a bash script and change the locale on the test server, I'm not sure how to do so, if you have an idea, please let me know.

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

8 years agonitpretty: use parse_full to allow groups and cie
Jean Privat [Fri, 24 Apr 2015 16:10:43 +0000 (23:10 +0700)]
nitpretty: use parse_full to allow groups and cie

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

8 years agopretty: force newline before a tab (or else things are ugly)
Jean Privat [Fri, 24 Apr 2015 16:01:05 +0000 (23:01 +0700)]
pretty: force newline before a tab (or else things are ugly)

There is still issues but this is more usable anyway.

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

8 years agonitpretty: new option --no-inline
Jean Privat [Fri, 24 Apr 2015 14:48:03 +0000 (21:48 +0700)]
nitpretty: new option --no-inline

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

8 years agonitpretty: new option --line_width
Jean Privat [Fri, 24 Apr 2015 13:54:17 +0000 (20:54 +0700)]
nitpretty: new option --line_width

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

8 years agopretty: workaround a bug with a missing `else`
Jean Privat [Fri, 24 Apr 2015 11:19:21 +0000 (18:19 +0700)]
pretty: workaround a bug with a missing `else`

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

8 years agopretty: handle typed literal arrays
Jean Privat [Fri, 24 Apr 2015 11:08:28 +0000 (18:08 +0700)]
pretty: handle typed literal arrays

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

8 years agopretty: skip commas in ANodes
Jean Privat [Fri, 24 Apr 2015 11:06:52 +0000 (18:06 +0700)]
pretty: skip commas in ANodes

I do not know why and by who the comma is skipped but in some case it
is still here. So force its removal if any.

For instance

~~~nit
foo(a, [b])
~~~

caused some issue

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

8 years agopretty: add consume_comment to process optional comments
Jean Privat [Fri, 24 Apr 2015 11:03:46 +0000 (18:03 +0700)]
pretty: add consume_comment to process optional comments

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

8 years agopretty: add `visit_args` to factorize the processing of arguments
Jean Privat [Fri, 24 Apr 2015 11:01:58 +0000 (18:01 +0700)]
pretty: add `visit_args` to factorize the processing of arguments

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

8 years agoversion 0.7.4 v0.7.4
Jean Privat [Mon, 4 May 2015 13:45:46 +0000 (09:45 -0400)]
version 0.7.4

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

9 years agosrc/android: remove configChange section from XML, it is defined by libs
Alexis Laferrière [Tue, 28 Apr 2015 17:25:55 +0000 (13:25 -0400)]
src/android: remove configChange section from XML, it is defined by libs

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

9 years agomisc/vim: add option to disable omnifunc
Alexis Laferrière [Tue, 28 Apr 2015 03:51:47 +0000 (23:51 -0400)]
misc/vim: add option to disable omnifunc

Fix #1300.

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

9 years agolib/collection: better doc for Iterator
Alexis Laferrière [Tue, 14 Apr 2015 20:55:48 +0000 (16:55 -0400)]
lib/collection: better doc for Iterator

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

9 years agolib/java: fix typo
Alexis Laferrière [Tue, 14 Apr 2015 20:54:55 +0000 (16:54 -0400)]
lib/java: fix typo

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

9 years agosrc/frontend: fix typo
Alexis Laferrière [Tue, 14 Apr 2015 20:55:06 +0000 (16:55 -0400)]
src/frontend: fix typo

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

9 years agolib/bucketed_game: revamp constructor of `Buckets`
Alexis Laferrière [Tue, 28 Apr 2015 02:58:10 +0000 (22:58 -0400)]
lib/bucketed_game: revamp constructor of `Buckets`

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

9 years agoexamples: Added i18n example and po files for several languages
Lucas Bajolet [Fri, 24 Apr 2015 14:51:22 +0000 (10:51 -0400)]
examples: Added i18n example and po files for several languages

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agocompiler: Added i18n phase and annotation
Lucas Bajolet [Tue, 21 Apr 2015 20:24:39 +0000 (16:24 -0400)]
compiler: Added i18n phase and annotation

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agolib: Added gettext basic support
Lucas Bajolet [Tue, 21 Apr 2015 20:17:14 +0000 (16:17 -0400)]
lib: Added gettext basic support

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agodoc/src: GraphArticle use new templates
Alexandre Terrasa [Tue, 24 Feb 2015 00:06:43 +0000 (01:06 +0100)]
doc/src: GraphArticle use new templates

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

9 years agoMerge: Named arguments
Jean Privat [Sat, 25 Apr 2015 02:19:15 +0000 (09:19 +0700)]
Merge: Named arguments

Named arguments allows the caller to specify some subset of arguments it wants to call.
This PR introduce a syntax for callers inspired from the Python one (the Ruby one uses columns that clashes with types declaration).

~~~nit
format(linewidth=80, separator=":", indent=true)
~~~

The specification tries to be as simple as possible

* Only default parameters can be passed by name; because the other are mandatory.
  This restriction is also useful to avoid to specify additional rules, like the last parameter of assignment methods, because the ones on default arguments apply.

~~~nit
fun foo(a,b: nullable Int) do ...
foo(b=1)
foo(null,1) # equivalent
~~~

* Named arguments can appear anywhere (not necessarily at the end)

~~~nit
fun foo(a: Int, b: nulable Int)
foo(b=1,2)
foo(2,1) # equivalent
~~~

* The order of evaluation is the order of the arguments (not the order of the parameters).
  I think this is more POLA this way.

* The names to use are the one of the statically designated method declaration (not the introduction).
  This one is problematic because the language permit the name of parameters to change in redefinitions.
  But in case of errors or in a IDE it is often more useful to point the most precise method definition.

The implementation was trivial because the hard work was already done in the previous PR.

This PR was unlocked by #1280

Pull-Request: #1281
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Etienne M. Gagnon <egagnon@j-meg.com>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>

9 years agoMerge: Parallelization phase improvement
Jean Privat [Sat, 25 Apr 2015 02:18:54 +0000 (09:18 +0700)]
Merge: Parallelization phase improvement

Adds the support of methods with return value

If you use `is threaded` on a method with a return, it will instead return you a custom instance of `Thread` class on which you can use the method `join` to retrieve the return of the annotated method. `join` waits for the method to end before returning.If you want to make sure that the method has done his work before trying to retrieve it's return value, you can check it with the boolean `is_done`

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

9 years agotests: add base_arg_named_inherit.nit
Jean Privat [Sat, 18 Apr 2015 15:12:11 +0000 (22:12 +0700)]
tests: add base_arg_named_inherit.nit

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

9 years agotests: add base_arg_named.nit and base_arg_order.nit
Jean Privat [Sat, 18 Apr 2015 15:11:40 +0000 (22:11 +0700)]
tests: add base_arg_named.nit and base_arg_order.nit

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

9 years agoengines: process named arguments
Jean Privat [Thu, 16 Apr 2015 11:46:16 +0000 (18:46 +0700)]
engines: process named arguments

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

9 years agotyping: process named arguments
Jean Privat [Sat, 18 Apr 2015 15:22:40 +0000 (22:22 +0700)]
typing: process named arguments

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

9 years agoparser: regenerate
Jean Privat [Thu, 16 Apr 2015 11:43:05 +0000 (18:43 +0700)]
parser: regenerate

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

9 years agogrammar: add expr.namedargs
Jean Privat [Thu, 16 Apr 2015 11:42:50 +0000 (18:42 +0700)]
grammar: add expr.namedargs

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

9 years agogrammar: extract `vararg` in a specific arg production
Jean Privat [Thu, 16 Apr 2015 11:42:17 +0000 (18:42 +0700)]
grammar: extract `vararg` in a specific arg production

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

9 years agomodel: add `MSignature::mparameter_by_name`
Jean Privat [Thu, 16 Apr 2015 11:41:19 +0000 (18:41 +0700)]
model: add `MSignature::mparameter_by_name`

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

9 years agosrc/doc: InheritanceList use new templates
Alexandre Terrasa [Mon, 23 Feb 2015 23:57:39 +0000 (00:57 +0100)]
src/doc: InheritanceList use new templates

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

9 years agosrc/doc: IntroRedefList use new templates
Alexandre Terrasa [Mon, 23 Feb 2015 23:53:04 +0000 (00:53 +0100)]
src/doc: IntroRedefList use new templates

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

9 years agosrc/doc: HierarchyList use new templates
Alexandre Terrasa [Mon, 23 Feb 2015 23:43:14 +0000 (00:43 +0100)]
src/doc: HierarchyList use new templates

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

9 years agosrc/doc: DefinitionArticle use new templates
Alexandre Terrasa [Mon, 23 Feb 2015 23:26:44 +0000 (00:26 +0100)]
src/doc: DefinitionArticle use new templates

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

9 years agosrc/doc: ConcernsArticle use new templates
Alexandre Terrasa [Mon, 23 Feb 2015 23:23:25 +0000 (00:23 +0100)]
src/doc: ConcernsArticle use new templates

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

9 years agosrc/doc: IntroArticle use new templates
Alexandre Terrasa [Tue, 24 Feb 2015 00:00:26 +0000 (01:00 +0100)]
src/doc: IntroArticle use new templates

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

9 years agotests: Added test for correct semantics of read in BufferedFileReader
Lucas Bajolet [Fri, 24 Apr 2015 19:38:20 +0000 (15:38 -0400)]
tests: Added test for correct semantics of read in BufferedFileReader

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agolib/standard: Fixed read method of BufferedReader
Lucas Bajolet [Fri, 24 Apr 2015 19:35:49 +0000 (15:35 -0400)]
lib/standard: Fixed read method of BufferedReader

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agopretty: make some method more robust (or more informative when crashing)
Jean Privat [Fri, 24 Apr 2015 10:25:20 +0000 (17:25 +0700)]
pretty: make some method more robust (or more informative when crashing)

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

9 years agoMerge: More binary operators
Jean Privat [Fri, 24 Apr 2015 08:24:01 +0000 (15:24 +0700)]
Merge: More binary operators

The first part of the PR cleanup and factorize some things related to the operators in the grammar and the AST.
Then the four bitwise operators are added.

Close #1271 unless some more thing is added to it (like generalized unary operators)

Note: as usual, github is useless when the parser is regenerated, so review the individual commits if you prefer.

Pull-Request: #1295
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>

9 years agotests: clean and complete test_ffi_c_operators
Jean Privat [Fri, 24 Apr 2015 07:50:09 +0000 (14:50 +0700)]
tests: clean and complete test_ffi_c_operators

thanks nitpretty!

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

9 years agotests: update error_syntax2.nit because & is now an operator
Jean Privat [Thu, 23 Apr 2015 10:01:55 +0000 (17:01 +0700)]
tests: update error_syntax2.nit because & is now an operator

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

9 years agotests: improve (and rename) test_operators.nit
Jean Privat [Thu, 23 Apr 2015 08:45:41 +0000 (15:45 +0700)]
tests: improve (and rename) test_operators.nit

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

9 years agosrc: handle new bitwise operators
Jean Privat [Thu, 23 Apr 2015 08:46:06 +0000 (15:46 +0700)]
src: handle new bitwise operators

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

9 years agoMerge: nitdoc: prepare the migration of nitdoc component to new phases
Jean Privat [Fri, 24 Apr 2015 06:03:24 +0000 (13:03 +0700)]
Merge: nitdoc: prepare the migration of nitdoc component to new phases

Only internal modification, no diff with the generated HTML of the previous version.

If you don't trust me (I you shouldn't), the demos will be [there](http://gresil.org/jenkins/job/CI-nitdoc/ws/doc/stdlib/index.html) and [there](http://gresil.org/jenkins/job/CI-nitdoc/ws/doc/nitc/index.html) in a few minutes.

> Brace yourself, next PR on that subject will be big.

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

9 years agoMerge: nitrpg: periodize stats
Jean Privat [Fri, 24 Apr 2015 06:03:14 +0000 (13:03 +0700)]
Merge: nitrpg: periodize stats

This will be used to display periodic stats about players and games.

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

9 years agoMerge: Nitrpg work
Jean Privat [Fri, 24 Apr 2015 06:03:07 +0000 (13:03 +0700)]
Merge: Nitrpg work

Improve the dashboard on the player page with `request_for_comment` things, and assigned work

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

9 years agoMerge: Hint vararg
Jean Privat [Fri, 24 Apr 2015 06:02:47 +0000 (13:02 +0700)]
Merge: Hint vararg

Improve the error message so that user that try to pass an array as is instead of elements is hinted about the `...` reverse-vararg operator.

~~~
fun foo(xs: Int...) do end
foo(1,2,3) # OK
var a = [1,2,3]
foo(a) # Error, expected `Int`; got `Array[Int]`. Is `...` missing?
foo(a...) # OK
~~~

![](http://i.imgur.com/zmyi8GR.jpg)

close #98 (quite old bug)

Pull-Request: #1294
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>

9 years agoMerge: Some metrics improvement and cleaning
Jean Privat [Fri, 24 Apr 2015 06:02:37 +0000 (13:02 +0700)]
Merge: Some metrics improvement and cleaning

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

9 years agoMerge: Model: add mclassdef2node
Jean Privat [Fri, 24 Apr 2015 06:02:31 +0000 (13:02 +0700)]
Merge: Model: add mclassdef2node

This was missing, I don't understand why but I need it.

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

9 years agotests: update sav/base_vararg3* with new hint error message
Jean Privat [Thu, 23 Apr 2015 06:10:28 +0000 (13:10 +0700)]
tests: update sav/base_vararg3* with new hint error message

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

9 years agotyping: special message when a single vararg is refused bu could be `...`-ed
Jean Privat [Thu, 23 Apr 2015 06:08:44 +0000 (13:08 +0700)]
typing: special message when a single vararg is refused bu could be `...`-ed

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

9 years agocontrib/nitrpg: use stats to store player nitcoins
Alexandre Terrasa [Wed, 25 Feb 2015 21:31:43 +0000 (22:31 +0100)]
contrib/nitrpg: use stats to store player nitcoins

So podium and stats can be displayed by time periods.

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

9 years agocontrib/nitrpg: make stats periodized
Alexandre Terrasa [Tue, 24 Feb 2015 19:15:20 +0000 (20:15 +0100)]
contrib/nitrpg: make stats periodized

Currently stats are stored:
* all time
* yearly
* monthly
* daily
* weekly

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

9 years agolib/counter: introduce Counter::dec
Alexandre Terrasa [Fri, 24 Apr 2015 02:00:03 +0000 (22:00 -0400)]
lib/counter: introduce Counter::dec

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

9 years agosrc/doc: introduce DocComposite HTML rendering services
Alexandre Terrasa [Fri, 24 Apr 2015 01:05:12 +0000 (21:05 -0400)]
src/doc: introduce DocComposite HTML rendering services

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

9 years agometrics/mendel: add missing comments
Alexandre Terrasa [Tue, 21 Apr 2015 20:28:06 +0000 (16:28 -0400)]
metrics/mendel: add missing comments

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

9 years agometrics/mendel: use new constructors
Alexandre Terrasa [Tue, 21 Apr 2015 20:27:53 +0000 (16:27 -0400)]
metrics/mendel: use new constructors

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

9 years agometrics/mendel: sort results in console display
Alexandre Terrasa [Tue, 21 Apr 2015 20:27:32 +0000 (16:27 -0400)]
metrics/mendel: sort results in console display

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

9 years agometrics: fixe missing documentation warnings
Alexandre Terrasa [Thu, 23 Apr 2015 18:57:23 +0000 (14:57 -0400)]
metrics: fixe missing documentation warnings

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

9 years agometrics: remove useless return types in redefs
Alexandre Terrasa [Thu, 23 Apr 2015 18:58:32 +0000 (14:58 -0400)]
metrics: remove useless return types in redefs

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

9 years agometrics: move `sum` up to interface `Metric`
Alexandre Terrasa [Thu, 23 Apr 2015 18:58:11 +0000 (14:58 -0400)]
metrics: move `sum` up to interface `Metric`

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

9 years agometrics: allow Metric sorting
Alexandre Terrasa [Tue, 21 Apr 2015 20:26:29 +0000 (16:26 -0400)]
metrics: allow Metric sorting

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

9 years agolib/standard: introduce ReserveDefaultComparator
Alexandre Terrasa [Thu, 23 Apr 2015 18:55:19 +0000 (14:55 -0400)]
lib/standard: introduce ReserveDefaultComparator

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