public inbox for ~johnnyrichard/olang-devel@lists.sr.ht
 help / color / mirror / code / Atom feed
* [PATCH olang 0/4] add support to compile if statements
@ 2024-09-08  0:31 Johnny Richard
  2024-09-08  0:31 ` [PATCH olang 1/4] lexer: add support to if token Johnny Richard
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Johnny Richard @ 2024-09-08  0:31 UTC (permalink / raw)
  To: ~johnnyrichard/olang-devel; +Cc: Johnny Richard

This first interaction we implemented compilation for simple _if_
statements without _else_  and _else-if_ support.

Carlos Maniero (2):
  lexer: add support to if token
  parser: parse a simple if statement

Johnny Richard (2):
  codegen: x86_64: add support to emit if statements
  codegen: x86_64: add if cond support for literals

 src/ast.c                                     | 13 +++
 src/ast.h                                     | 11 +++
 src/codegen_linux_x86_64.c                    | 64 +++++++++++----
 src/lexer.c                                   |  5 ++
 src/lexer.h                                   |  1 +
 src/parser.c                                  | 79 ++++++++++++++++++-
 src/pretty_print_ast.c                        | 14 ++++
 tests/integration/tests/0020_if_statement.ol  | 43 ++++++++++
 .../tests/0021_if_statement_failed.ol         | 24 ++++++
 .../tests/0022_if_statement_literal.ol        | 24 ++++++
 10 files changed, 260 insertions(+), 18 deletions(-)
 create mode 100644 tests/integration/tests/0020_if_statement.ol
 create mode 100644 tests/integration/tests/0021_if_statement_failed.ol
 create mode 100644 tests/integration/tests/0022_if_statement_literal.ol


base-commit: 83b791b252e46b6bf081bcd75c8e34c03c45681f
-- 
2.46.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-09-07 22:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-08  0:31 [PATCH olang 0/4] add support to compile if statements Johnny Richard
2024-09-08  0:31 ` [PATCH olang 1/4] lexer: add support to if token Johnny Richard
2024-09-08  0:31 ` [PATCH olang 2/4] parser: parse a simple if statement Johnny Richard
2024-09-08  0:31 ` [PATCH olang 3/4] codegen: x86_64: add support to emit if statements Johnny Richard
2024-09-08  0:31 ` [PATCH olang 4/4] codegen: x86_64: add if cond support for literals Johnny Richard

Code repositories for project(s) associated with this public inbox

	https://git.johnnyrichard.com/olang.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox