From 7c6ac33968a303f43204a039c00ccddd7faa1497 Mon Sep 17 00:00:00 2001 From: Jari Vetoniemi Date: Wed, 26 Sep 2018 15:49:45 +0300 Subject: Add some comments --- src/compiler/compiler.lm | 3 +++ src/compiler/expr.lm | 5 +++++ src/compiler/types.lm | 3 +++ 3 files changed, 11 insertions(+) diff --git a/src/compiler/compiler.lm b/src/compiler/compiler.lm index a4968f9..33dd2c3 100644 --- a/src/compiler/compiler.lm +++ b/src/compiler/compiler.lm @@ -1,3 +1,6 @@ +# Filespec compiler +# Takes in fspec source code and outputs bytecode for further processing + include 'expr.lm' context fspec diff --git a/src/compiler/expr.lm b/src/compiler/expr.lm index d615358..f758723 100644 --- a/src/compiler/expr.lm +++ b/src/compiler/expr.lm @@ -1,3 +1,8 @@ +# Expression parser && collapser +# This lets us know what kind of operations we need to compile in. +# But it also collapses the expressions offline, so we don't have to compile in constant expressions +# This makes the compiler "useful" + include 'types.lm' global RTYPE_UNKNOWN:int = 0 diff --git a/src/compiler/types.lm b/src/compiler/types.lm index 34a9026..6edc2ea 100644 --- a/src/compiler/types.lm +++ b/src/compiler/types.lm @@ -1,3 +1,6 @@ +# Basic (mostly) langauge independent types +# These are the foundation for understanding the source code + context number context unsigned literal `true `false -- cgit v1.2.3