This repository has been archived on 2026-03-01 . You can view files and clone it. You cannot open issues or pull requests or push a commit.
fbddd9a199f88bac39a8f7a286d42a6a8ac71230
Solstice rewrite in C
Not self hosting yet. Maybe once this compiler is done.
Building
bash build.c
Todo List
-
Lexer
- Lex values
- int
- double
- string
- char
- bool
- Lex keywords
- Ignore comments (//, /**/, #)
- Lex delimiters
- ()
- {}
- .
- :
- ,
- ==, =
- >, >=
- <, <=
- !, !=
- +, +=, ++
- -, -=, --
- *, *=
- /, /=
- Lex types
- Basic types (int, double, string, bool, char)
- Advanced types (fun(...), template(...), object(...))
- Lex identifiers
- Lex values
-
Parser
- Create structure to hold nodes
- Start parsing tree
- puts
- Literal values
- '='
- Maths
- Brackets
- Comparisons
- Code blocks (
{ }) - If
- While
- Function Definition
- Function Calls
- Structs
- new
- use
-
Ground compiler
- Create structure to descend tree
- Check types
- puts (none)
- set (typeof children.at[1])
- Identifiers (scope->variables[idName])
- add (string, int, double)
- subtract, multiply, divide (int, double)
- Comparisons (bool)
- Code block (none)
- if, while (none)
- Function definition (fun(...))
- Function call (return type of function)
- Struct (template(...))
- new (children[0])
- use (none)
- Generate code
- puts
- Literal values
- '='
- Maths
- Brackets
- Comparisons
- Code blocks (
{ }) - If
- While
- Function Definition
- Function Calls
- Structs
- new
- use
Description
Languages
C
100%