rubyx/lib/sol
Torsten b2dce92883 fix arm return bug
even had a fixme on it
2020-03-24 22:04:44 +02:00
..
assignment.rb Makes slots linked list 2020-02-17 14:29:45 +07:00
basic_values.rb Slotted constructor cleanup 2020-02-17 14:45:54 +07:00
builtin.rb fix naming mistakes fo Word.get/set macros 2020-03-22 14:31:43 +02:00
call_statement.rb Makes slots linked list 2020-02-17 14:29:45 +07:00
class_expression.rb Rename Vool to Sol 2019-10-04 00:38:47 +03:00
class_method_expression.rb Rename Vool to Sol 2019-10-04 00:38:47 +03:00
if_statement.rb Makes slots linked list 2020-02-17 14:29:45 +07:00
ivar_assignment.rb Rename Vool to Sol 2019-10-04 00:38:47 +03:00
lambda_expression.rb Slotted constructor cleanup 2020-02-17 14:45:54 +07:00
local_assignment.rb Rename Vool to Sol 2019-10-04 00:38:47 +03:00
macro_expression.rb passing values to macros 2020-03-22 14:31:43 +02:00
method_expression.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 Makes slots linked list 2020-02-17 14:29:45 +07:00
send_statement.rb fix arm return bug 2020-03-24 22:04:44 +02:00
statement.rb check for correct operator 2020-03-22 14:31:43 +02:00
statements.rb Rename Vool to Sol 2019-10-04 00:38:47 +03:00
super_statement.rb Rename Vool to Sol 2019-10-04 00:38:47 +03:00
variables.rb Slotted constructor cleanup 2020-02-17 14:45:54 +07:00
while_statement.rb Makes slots linked list 2020-02-17 14:29:45 +07:00
yield_statement.rb fix argument transfer (to be logical) 2020-02-27 18:19:27 +02:00

SOL

Simple Object Language

in other words, ruby without the fluff.

Possibly later other languages can compile to this level and use rx-file as code definition.

Syntax tree

Sol is a layer with concrete syntax tree, just like the ruby layer above. Sol is just simplified, without fluff, see below.

The next layer down is the SlotMachine, which uses an instruction list.

The nodes of the syntax tree are all the things one would expect from a language, if statements and the like. There is no context yet, and actual objects, representing classes and methods, will be created on the way down.

Fluff

Ruby has lots of duplication to help programmers to write less. An obvious example is the existence of until, which really means if not. Other examples, some more impactful are:

  • No implicit blocks, those get passed as normal arguments (the last)
  • No splats
  • no case
  • no elseif (no unless, no ternary operator)
  • no global variables.

Parfait objects

The compilation process ends up creating (parfait) objects to represent things like classes, types and constants. This is done in this layer, on the way down to SlotMachine (ie not during init)