Jean Privat [Tue, 10 Apr 2012 17:46:44 +0000 (13:46 -0400)]
tests: generate files in out/ instead of tests/
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 10 Apr 2012 16:05:37 +0000 (12:05 -0400)]
tests: do not fail test_attr
_i and _j are not initialized.
but the current compiler do not check that Sys is correctly built.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 10 Apr 2012 16:18:47 +0000 (12:18 -0400)]
syntax: implements __debug__ type construct
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 10 Apr 2012 16:03:06 +0000 (12:03 -0400)]
parser: add __debug__ type construct
The __debug__ syntax could be extended to force dialog with the compiler.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 22 Mar 2012 13:51:16 +0000 (09:51 -0400)]
parser: add ANode::debug
This method simplify debugging.
The programmer can use debug instead of print to print traces and values.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 22 Mar 2012 13:47:31 +0000 (09:47 -0400)]
parser: simplify constroctors of nodes
in parser_nodes, ANode has an empty constructor inherited by all subclasses
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 10 Apr 2012 15:51:01 +0000 (11:51 -0400)]
lib: add 'module' keyword to environ
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Sun, 18 Mar 2012 01:42:04 +0000 (21:42 -0400)]
clean: make some classes abstract or interfaces
Some even have 'abstract' in their names.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 16 Mar 2012 19:00:18 +0000 (15:00 -0400)]
parser: new class ASendReassignFormExpr
This class specializes ASendExpr and AReassignFormExpr
and generalize ACallReassignExpr and ABraReassignExpr
In fact, specializing ASendExpr is not ideal but removing this link
will require more factorization.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 6 Mar 2012 19:34:23 +0000 (14:34 -0500)]
parser: generalize n_propdefs to AClassdef
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 5 Mar 2012 23:30:01 +0000 (18:30 -0500)]
extract new module toolcontext from mmloader
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 5 Mar 2012 22:49:48 +0000 (17:49 -0500)]
nitc: move line coloration to Location
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 1 Mar 2012 18:20:03 +0000 (13:20 -0500)]
add src/doc in gitignore
This will remove pollution in git tools when trying nitdoc in src.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 27 Feb 2012 21:23:56 +0000 (16:23 -0500)]
Merge branch 'fix-ni' into wip
Alexis Laferrière [Fri, 24 Feb 2012 14:50:54 +0000 (09:50 -0500)]
ni: fix allowing to rename parameters for redef as extern method
Is actually used by nits to generated expected names. Will but more
useful with inline interface.
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Mon, 27 Feb 2012 21:00:45 +0000 (16:00 -0500)]
tools: protect ccache detection to avoid pollution on stderr
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 23 Feb 2012 17:50:45 +0000 (12:50 -0500)]
lib: remove NativeFileCapable
Methods are moved as constructors in the NativeFile extern class.
Signed-off-by: Jean Privat <jean@pryen.org>
Alexis Laferrière [Mon, 27 Feb 2012 17:21:51 +0000 (12:21 -0500)]
icode: do not visit non-existant instanciation iroutines of extern classes
Fixes global compilation of programs using extern constructors.
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Mon, 27 Feb 2012 20:09:21 +0000 (15:09 -0500)]
tests: update nits.sav because of the merge
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 27 Feb 2012 21:17:06 +0000 (16:17 -0500)]
Merge branch 'global' into wip
Jean Privat [Mon, 27 Feb 2012 21:15:29 +0000 (16:15 -0500)]
tests: update Makefile to test nits
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 27 Feb 2012 18:55:52 +0000 (13:55 -0500)]
Merge branch 'warn' into wip
Alexis Laferrière [Fri, 24 Feb 2012 18:53:47 +0000 (13:53 -0500)]
c_src: fix last update, _nitni.h s were referring to _nit.h from Nit src
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Mon, 27 Feb 2012 17:45:22 +0000 (12:45 -0500)]
RTA: inits are polymorphic
Code assumed that call of an init are always monomorphic.
This is not true since a constrictor can call another constructor in a
polymorphic way.
The solution is to simply manage call to init the same way than other calls.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 27 Feb 2012 15:48:14 +0000 (10:48 -0500)]
syntax: warn for superfluous parentheses in signatures
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 27 Feb 2012 15:24:35 +0000 (10:24 -0500)]
parser: include obra and cbra in signatures
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 24 Feb 2012 21:40:32 +0000 (16:40 -0500)]
nitc: activate warnings by default
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 24 Feb 2012 19:26:11 +0000 (14:26 -0500)]
typing: error on foo() when foo is a variable
With the last parser modification we can now distinguish between
no arguments and empty parentheses.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 23 Feb 2012 17:55:22 +0000 (12:55 -0500)]
lib: remove obsolete sdl and game library
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 24 Feb 2012 19:15:30 +0000 (14:15 -0500)]
tests: change test_parser arguments to be more stable
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 24 Feb 2012 19:03:57 +0000 (14:03 -0500)]
src: remove detected warnings about ()
Signed-off-by: Jean Privat <jean@pryen.org>
Alexis Laferrière [Thu, 3 Nov 2011 02:56:55 +0000 (22:56 -0400)]
ni: minor code correction in ni_metamodel.nit
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 14 Feb 2012 01:06:19 +0000 (20:06 -0500)]
ni: use special mangled name in ni generated code to support extern classes
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Fri, 24 Feb 2012 16:55:45 +0000 (11:55 -0500)]
syntax: warn on superfluous empty parentheses on calls
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 24 Feb 2012 16:49:17 +0000 (11:49 -0500)]
parser: include obra, cbra, opar and cpar in arguments
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 24 Feb 2012 16:02:59 +0000 (11:02 -0500)]
parser: include obra and cbra in range nodes
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 24 Feb 2012 15:45:52 +0000 (10:45 -0500)]
lib&src: remove detected warnings
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 23 Feb 2012 17:26:30 +0000 (12:26 -0500)]
nitc: do not crash on --output-format icode
However, --output-format icode is not really useful
in a multi-module program.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 23 Feb 2012 16:34:00 +0000 (11:34 -0500)]
global: move options from nitc.nit to global.nit
Most of the global optimization concern should be in global.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 24 Feb 2012 10:18:03 +0000 (05:18 -0500)]
typing: some warning cleanup
Jean Privat [Fri, 24 Feb 2012 10:17:50 +0000 (05:17 -0500)]
tools: kill showerr
Now coloring is done entirely in nitc.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 24 Feb 2012 10:16:03 +0000 (05:16 -0500)]
typing: warn for superfluous parentheses
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 24 Feb 2012 10:15:15 +0000 (05:15 -0500)]
parser: include parentheses in parexpr and as_*expr
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 24 Feb 2012 10:13:28 +0000 (05:13 -0500)]
typing: proxyexpr delegate more services
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 23 Feb 2012 15:26:08 +0000 (10:26 -0500)]
global: create a new module global to gather (and nest) global analysis
analysis now only contains local required analysis.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 17 Feb 2012 22:08:02 +0000 (17:08 -0500)]
tools: clean Makefiles
* create a Makefile in src
* rule 'docs' makes all the doc (including pdf)
* refresh 'clean' and 'distclean'
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 17 Feb 2012 21:11:40 +0000 (16:11 -0500)]
nitc: use simplify_path to manipulate sane filenames
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 17 Feb 2012 21:06:15 +0000 (16:06 -0500)]
lit: add join_path
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 17 Feb 2012 21:05:55 +0000 (16:05 -0500)]
lib: handle ../.. in the simplify_path method
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 17 Feb 2012 17:19:40 +0000 (12:19 -0500)]
parser: detect bad string and char literals
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 17 Feb 2012 16:50:16 +0000 (11:50 -0500)]
parser: allow comments without eol (for eof)
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 17 Feb 2012 19:12:11 +0000 (14:12 -0500)]
tools: handle end of file errors
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 17 Feb 2012 19:09:40 +0000 (14:09 -0500)]
parser: improve Token.to_s and syntax error messages
So we say
unexpected keyword 'end'
instead of
unexpected token
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 17 Feb 2012 18:52:37 +0000 (13:52 -0500)]
parser: integrate the token 'end' in the AST
This provide better location since the 'end' is not ignored.
Other tool that use the AST may like to have it.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 17 Feb 2012 15:44:08 +0000 (10:44 -0500)]
parser: add a hot location for closure definitions
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 17 Feb 2012 15:34:25 +0000 (10:34 -0500)]
assert: use id.text.to_s instead of id.to_s for runtime error
This prepare for better human readable Token.to_s
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 16 Feb 2012 18:33:48 +0000 (13:33 -0500)]
c_src: update
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 15 Feb 2012 21:32:10 +0000 (16:32 -0500)]
tests: update nitdoc (because of the merge)
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 15 Feb 2012 21:07:31 +0000 (16:07 -0500)]
Merge branch 'ni' into wip
Conflict: use c_src of ni
Jean Privat [Wed, 15 Feb 2012 21:06:09 +0000 (16:06 -0500)]
Merge branch 'nitdoc2' into wip
Conflicts:
lib/standard/file.nit
src/nitdoc.nit
Jean Privat [Tue, 14 Feb 2012 19:39:34 +0000 (14:39 -0500)]
mm: force inheritance when selectioning local property
Because of some optimizations, the inheritance is not always performed
on classes. The selection of a local property is not aware of that and
access thing event if the inheritance is not computed.
This patch force the inheritance if the global property is not found.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 15 Feb 2012 19:40:57 +0000 (14:40 -0500)]
tests: improve the ls portability
use /bin/ls to exclude shell aliases
force LANG to avoid variable sorting
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 15 Feb 2012 20:46:52 +0000 (15:46 -0500)]
tests: clean the write directory for tests with arguments
This is the #1 cause of failed tests of the nitdoc.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 15 Feb 2012 20:09:38 +0000 (15:09 -0500)]
Merge branch 'lib' into wip
Jean Privat [Wed, 15 Feb 2012 20:09:22 +0000 (15:09 -0500)]
Merge branch 'tools2' into wip
Jean Privat [Tue, 14 Feb 2012 19:11:46 +0000 (14:11 -0500)]
tools: remove remaining POSIX_C_SOURCE
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 15 Feb 2012 19:38:57 +0000 (14:38 -0500)]
tests: add new nitdoc options to test
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 14 Feb 2012 19:17:21 +0000 (14:17 -0500)]
ni: native_interface/frontier and its clients use syntax stuff
Add the import the please to compiler.
However, maybe it should be removed.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 14 Feb 2012 19:14:18 +0000 (14:14 -0500)]
ni: move default_extern_name and friendly_extern_name to primitive_info
Maybe it should be moved to metamodel?
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 14 Feb 2012 19:13:26 +0000 (14:13 -0500)]
ni: use MMMethod#global.is_init instead of MMMethod#is_init
The latter is in fact a syntax thing, the former is a metamodel thing.
This naming is just ugly
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 15 Feb 2012 19:27:10 +0000 (14:27 -0500)]
nitdoc: generate docs with foot-text and overview-text
Signed-off-by: Jean Privat <jean@pryen.org>
Alexis Laferrière [Wed, 15 Feb 2012 16:15:42 +0000 (11:15 -0500)]
analysis: mark all extern methods as reachable and adds according test
This allows use and compiling of hybrid modules with unused native methods.
Before this patch, Nit methods explicitly called by an uncalled native method
might not be compiled to C. However, the C implmentation of the uncalled native
method cannot be pruned. Therefore, without the referenced Nit method, the
uncalled native method cannot be compiled.
TODO: Replace this solution by generating stubs for explicitly called Nit methods
referenced only by uncalled native methods.
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Wed, 15 Feb 2012 16:17:42 +0000 (11:17 -0500)]
analysis: fix analysis with native interface for global compilation
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Wed, 15 Feb 2012 14:57:02 +0000 (09:57 -0500)]
icode: implements icode for explicit imports
Will be used by static analysis. Also does not compile explicit extern calls.
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Wed, 15 Feb 2012 19:01:59 +0000 (14:01 -0500)]
nitdoc: useless # in show_source
old Ruby reflex maybe...
Signed-off-by: Jean Privat <jean@pryen.org>
Alexandre Terrasa [Wed, 15 Feb 2012 05:35:58 +0000 (00:35 -0500)]
nitdoc: fix missing spaces between modules names and following text
Signed-off-by: Alexandre Terrasa <alexandre@moz-concept.com>
Morriar [Wed, 15 Feb 2012 05:32:43 +0000 (00:32 -0500)]
nitdoc: add --overview-text et --footer-text options
Signed-off-by: Alexandre Terrasa <alexandre@moz-concept.com>
Jean Privat [Tue, 14 Feb 2012 19:49:19 +0000 (14:49 -0500)]
lib: update the documentation
Add some examples and fix some spelling issues
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 14 Feb 2012 16:29:43 +0000 (11:29 -0500)]
nitdoc: include the help in the menubar
Signed-off-by: Jean Privat <jean@pryen.org>
Morriar [Mon, 13 Feb 2012 19:46:23 +0000 (14:46 -0500)]
NitDoc: Add help file.
Signed-off-by: Morriar <alexandre.terrasa@gmail.com>
Alexis Laferrière [Tue, 14 Feb 2012 04:53:22 +0000 (23:53 -0500)]
nitdoc: changes class name used within dot graphs
Avoids conflicts with classes named Edge.
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 14 Feb 2012 04:52:24 +0000 (23:52 -0500)]
nitdoc: sets destination of Overview link to "index.html" instead of "./"
Allows better use in local file-system.
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Tue, 14 Feb 2012 16:10:30 +0000 (11:10 -0500)]
lib: promote replace, html_escape and simplify_path to the lib
These function are generic ans useful enough to be included in the
standard library.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 13 Feb 2012 21:30:58 +0000 (16:30 -0500)]
nitdoc: handle vararg in signature
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 13 Feb 2012 21:29:14 +0000 (16:29 -0500)]
nitdoc: use resource file from share/nitdoc
Signed-off-by: Jean Privat <jean@pryen.org>
Morriar [Sat, 11 Feb 2012 03:24:30 +0000 (22:24 -0500)]
nitdoc: Add shared files (imgs, styles and scripts)
Signed-off-by: Morriar <alexandre.terrasa@gmail.com>
Jean Privat [Mon, 13 Feb 2012 21:02:07 +0000 (16:02 -0500)]
update NOTICE and LICENSE
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 14 Feb 2012 15:35:23 +0000 (10:35 -0500)]
tools: add nits to .gitignore
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Tue, 14 Feb 2012 15:24:02 +0000 (10:24 -0500)]
tests: fix test_parser
Signed-off-by: Jean Privat <jean@pryen.org>
Alexis Laferrière [Mon, 13 Feb 2012 20:07:03 +0000 (15:07 -0500)]
tests: removes incomplete and duplicate tests for native interface
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Mon, 13 Feb 2012 20:04:05 +0000 (15:04 -0500)]
tests: adds sav for test_ni_cast_extra
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Mon, 13 Feb 2012 19:14:34 +0000 (14:14 -0500)]
ni: fix isa checks with new module names and updates c_src accordingly
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Fri, 11 Nov 2011 17:08:34 +0000 (12:08 -0500)]
lib: adds hypotenuse to math module as Float::hypot
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 9 Feb 2012 20:02:52 +0000 (15:02 -0500)]
lib: adds String::file_extension to retreive extension from a path
ex: "my.file.txt".file_extension == "txt"
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Mon, 6 Jun 2011 17:35:13 +0000 (13:35 -0400)]
lib: adds Collection::rand to get a random element from a collection
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Sun, 3 Apr 2011 15:57:20 +0000 (11:57 -0400)]
lib: adds swap_at to arrays
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 31 Mar 2011 23:11:13 +0000 (19:11 -0400)]
lib: adds abs function to Int
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Fri, 10 Feb 2012 16:44:04 +0000 (11:44 -0500)]
lib: remove some depreciated methods in Map
Known clients are updated.
The only remaining depreciated method is has_key.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 10 Feb 2012 17:13:55 +0000 (12:13 -0500)]
lib: removals on Map are done on the views (keys and values)
Thus depreciate some methods in Map
remove_at -> keys.remove
remove -> values.remove
remove_all -> values.remove_all
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 13 Feb 2012 19:01:25 +0000 (14:01 -0500)]
lib: for on maps require two parameters
Existing clients require to adapts existing loops on map:
for v in my_map do
has to be rewrite to
for k, v in my_map do
or
for v in my_map.values do
Signed-off-by: Jean Privat <jean@pryen.org>