From: "Carlos Maniero" <carlos@maniero.me>
To: "Johnny Richard" <johnny@johnnyrichard.com>,
<~johnnyrichard/olang-devel@lists.sr.ht>
Subject: Re: [PATCH olang v1 2/2] cli: remove code duplication
Date: Mon, 25 Mar 2024 23:30:48 -0300 [thread overview]
Message-ID: <D03BUGDDFTKZ.2LJ0QHIUO2VRA@maniero.me> (raw)
In-Reply-To: <20240325223715.459442-3-johnny@johnnyrichard.com>
I tested the soluction and everything seems to be working fine.
Tests I've executed:
./olang examples/main_exit.ol --dump-ast
Translation_Unit
`-Function_Definition <name:main> <return:0>
`-Block
`-Return_Statement
`-Literal <kind:u32> <value:0>
./olang examples/main_exit.ol --dump-tokens
examples/main_exit.ol:1:1: <fn>
examples/main_exit.ol:1:4: <identifier>
examples/main_exit.ol:1:8: <(>
examples/main_exit.ol:1:9: <)>
examples/main_exit.ol:1:10: <:>
examples/main_exit.ol:1:12: <identifier>
examples/main_exit.ol:1:16: <{>
examples/main_exit.ol:1:17: <line_feed>
examples/main_exit.ol:2:3: <return>
examples/main_exit.ol:2:10: <number>
examples/main_exit.ol:2:11: <line_feed>
examples/main_exit.ol:3:1: <}>
examples/main_exit.ol:3:2: <line_feed>
examples/main_exit.ol:4:1: <EOF>
./olang examples/expression.ol --dump-ast
Translation_Unit
`-Function_Definition <name:main> <return:0>
`-Block
`-Return_Statement
`-Binary_Operation (-)
|-Binary_Operation (+)
| |-Literal <kind:u32> <value:10>
| `-Binary_Operation (*)
| |-Literal <kind:u32> <value:1>
| `-Literal <kind:u32> <value:2>
`-Binary_Operation (-)
|-Literal <kind:u32> <value:10>
`-Binary_Operation (/)
|-Binary_Operation (+)
| |-Literal <kind:u32> <value:1>
| `-Literal <kind:u32> <value:1>
`-Literal <kind:u32> <value:2>
Nice work!
Applied.
To git.sr.ht:~johnnyrichard/olang
ce5389c..117a068 main -> main
prev parent reply other threads:[~2024-03-26 2:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-25 22:36 [PATCH olang v1 0/2] Introduce CLI option for improved AST tree visualization Johnny Richard
2024-03-25 22:36 ` [PATCH olang v1 1/2] cli: add new option to pretty print AST tree Johnny Richard
2024-03-25 22:36 ` [PATCH olang v1 2/2] cli: remove code duplication Johnny Richard
2024-03-25 21:37 ` [olang/patches/.build.yml] build failed builds.sr.ht
2024-03-26 2:32 ` Carlos Maniero
2024-03-26 2:35 ` Carlos Maniero
2024-03-26 2:30 ` Carlos Maniero [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=D03BUGDDFTKZ.2LJ0QHIUO2VRA@maniero.me \
--to=carlos@maniero.me \
--cc=johnny@johnnyrichard.com \
--cc=~johnnyrichard/olang-devel@lists.sr.ht \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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