rubyx/lib/ruby
Torsten Rüger d1f8733623 Rename Vool to Sol
Simple is really the descriptive name for the layer
Sure, it is "virtual" but that is not as important as the fact that it is simple (or simplified)
Also objct (based really) is better, since orientated implies it is a little like that, but only orientated, not really it. Sol only has objects, nothing else
Just cause i was renaming anyway
2019-10-04 00:38:47 +03:00
..
array_statement.rb start a new ruby layer to do the to_vool conversion 2018-07-19 14:46:51 +03:00
assignment.rb Rename Vool to Sol 2019-10-04 00:38:47 +03:00
basic_values.rb Rename Vool to Sol 2019-10-04 00:38:47 +03:00
call_statement.rb Rename Vool to Sol 2019-10-04 00:38:47 +03:00
class_method_statement.rb Rename Vool to Sol 2019-10-04 00:38:47 +03:00
class_statement.rb Rename Vool to Sol 2019-10-04 00:38:47 +03:00
hash_statement.rb start a new ruby layer to do the to_vool conversion 2018-07-19 14:46:51 +03:00
if_statement.rb Rename Vool to Sol 2019-10-04 00:38:47 +03:00
logical_statement.rb Rename Vool to Sol 2019-10-04 00:38:47 +03:00
method_statement.rb Rename Vool to Sol 2019-10-04 00:38:47 +03:00
normalizer.rb Rename Vool to Sol 2019-10-04 00:38:47 +03:00
README.md Rename Vool to Sol 2019-10-04 00:38:47 +03:00
return_statement.rb Rename Vool to Sol 2019-10-04 00:38:47 +03:00
ruby_block_statement.rb Rename Vool to Sol 2019-10-04 00:38:47 +03:00
ruby_compiler.rb Rename Vool to Sol 2019-10-04 00:38:47 +03:00
send_statement.rb Rename Vool to Sol 2019-10-04 00:38:47 +03:00
statement.rb Rename Vool to Sol 2019-10-04 00:38:47 +03:00
statements.rb Rename Vool to Sol 2019-10-04 00:38:47 +03:00
variables.rb Rename Vool to Sol 2019-10-04 00:38:47 +03:00
while_statement.rb Rename Vool to Sol 2019-10-04 00:38:47 +03:00
yield_statement.rb Some docs and to_s testing 2018-09-01 15:54:25 +03:00

Ruby

A representation of the ruby code.

Concrete Syntax tree

Ruby is parsed by the parser gem (big thanks to whitequark). Own attempts at this task have failed utterly, because ruby is a huge language (and not well defined at that)

Alas, the parser gem creates an abstract syntax tree, meaning one class is used to represent all node types.

Imho object oriented languages have a class system to do just that, ie represent what we may loosely call type here, ie the kind of statement.

The ruby layer is really all about defining classes for every kind of statement, thus "typing" the syntax tree, and making it concrete.

to Sol

In our nice layers, we are on the way down to Sol, a simplified version of oo.

It has proven handy to have this layer, so the code for transforming each object is in the class representing that object. (As one does in oo, again imho).

compile_time_expansions

We do some expansions at compile time that are in fact methods calls in real ruby.

First among those will be require (+ require_relative) , but attribute readers will surely follow.

Parfait objects

The compilation process ends up creating (parfait) objects to represent things like classes, types and constants. This is not done here yet, but in the sol layer.