From: Jean Privat Date: Wed, 15 Feb 2012 21:07:31 +0000 (-0500) Subject: Merge branch 'ni' into wip X-Git-Tag: v0.5~31 X-Git-Url: http://nitlanguage.org Merge branch 'ni' into wip Conflict: use c_src of ni --- 61b4c26d9fa8bdd76965322d71a8c64411beecd6 diff --cc Makefile index 909fbde,117dad5..9bbed89 --- a/Makefile +++ b/Makefile @@@ -16,11 -16,8 +16,11 @@@ NITCOPT= - all: bin/nitc bin/nitdoc doc/stdlib/index.html + all: bin/nitc bin/nitdoc doc/stdlib/index.html bin/nits +docs: doc/stdlib/index.html doc/nitc/index.html + + bin/nitc: c_src/nitc src/parser/parser.nit @echo '***************************************************************' @echo '* Compile nitc from NIT source files *' @@@ -33,8 -30,14 +33,14 @@@ bin/nitdoc: bin/nit @echo '* Compile nitdoc from NIT source files *' @echo '***************************************************************' src/git-gen-version.sh - bin/nitc ${NITCOPT} -o bin/nitdoc -O -v src/nitdoc.nit + cd src; ../bin/nitc ${NITCOPT} -o ../bin/nitdoc -O -v nitdoc.nit + bin/nits: bin/nitc + @echo '***************************************************************' + @echo '* Compile nits from NIT source files *' + @echo '***************************************************************' + bin/nitc ${NITCOPT} -o bin/nits -O -v src/nits.nit + doc/stdlib/index.html: bin/nitdoc @echo '***************************************************************' @echo '* Generate doc for NIT standard library *' diff --cc src/nitc.nit index b55dfeb,a5a7945..7525f90 --- a/src/nitc.nit +++ b/src/nitc.nit @@@ -20,8 -20,10 +20,10 @@@ package nit import abstracttool import analysis import program -private import compiling -private import syntax +import compiling +import syntax + import native_interface + import separate_options # The main class of the nitcompiler program class NitCompiler diff --cc src/syntax/mmbuilder.nit index 2aeff80,6c8fef0..f622976 --- a/src/syntax/mmbuilder.nit +++ b/src/syntax/mmbuilder.nit @@@ -20,24 -20,8 +20,25 @@@ package mmbuilder import syntax_base + private import primitive_info +redef class ToolContext + redef fun handle_property_conflict(lc, impls) + do + var location: nullable Location = null + if lc isa MMSrcLocalClass then + var node = lc.node + if node != null then node.location + end + #if location == null then location = lc.mmmodule.location + var clas = new Array[MMLocalClass] + for i in impls do + clas.add(i.local_class) + end + self.fatal_error(location, "Property inheritance conflict in class {lc} for `{impls.first.name}': conflicting properties are defined in {clas.join(", ")}") + end +end + # Class specialization hierarchy sorter private class CSHSorter super AbstractSorter[MMLocalClass]