nitc :: astbuilder
Instantiation and transformation of semantic nodes in the AST of expressions and statementsSerializable::inspect
to show more useful information
nitc :: modelbuilder
more_collections :: more_collections
Highly specific, but useful, collections-related classes.serialization :: serialization_core
Abstract services to serialize Nit objects to different formatsnitc :: toolcontext
Common command-line tool infrastructure than handle options and error messagescore :: union_find
union–find algorithm using an efficient disjoint-set data structurenitc :: light_only
Compiler support for the light FFI only, detects unsupported usage of callbacksnitc :: separate_erasure_compiler
Separate compilation of a Nit program with generic type erasure
# A ligHt Nit compiler
module nith
import modelize
import transform
import rapid_type_analysis
import compiler::separate_erasure_compiler
import compiler::compiler_ffi::light_only
redef class ToolContext
redef fun process_options(args)
do
super
var sum = opt_separate.value.to_i + opt_erasure.value.to_i
if sum > 1 then
print "Options --separate and --erasure are exclusive"
exit(1)
else if sum == 0 then
# --separate by default
opt_separate.value = true
end
end
end
src/nith.nit:17,1--42,3