Implement parseStatement() #75

Closed
opened 2023-01-07 11:13:11 +00:00 by deavmi · 5 comments
Owner

What is parseStatement()?

Well, we have parseBody() which effectievly implements a while-llop whose body would be what we want parseStatement() to be. We want this because in some cases we only need to parse the next available statement.

## What is `parseStatement()`? Well, we have `parseBody()` which effectievly implements a while-llop whose body would be what we want `parseStatement()` to be. We want this because in some cases we only need to parse the next available statement.
deavmi added a new dependency 2023-01-07 11:13:33 +00:00
deavmi added reference loops 2023-01-07 11:14:13 +00:00
deavmi added the
parser
label 2023-01-07 11:15:07 +00:00
deavmi self-assigned this 2023-01-07 11:15:11 +00:00
deavmi added this to the Parser project 2023-01-07 11:15:15 +00:00
deavmi added this to the Basics milestone 2023-01-07 11:15:18 +00:00
Author
Owner

I have now added the body of code in parseBody() to parseStatement(). I could actually do something where only a sub-section of said code from parseBody() is actually moved into parseStatement() as I don't think that a class definition or struct would make much sense, in any case it is what it is for now.

I haven't yet activated this though.

I have now added the body of code in `parseBody()` to `parseStatement()`. I could actually do something where only a sub-section of said code from `parseBody()` is actually moved into `parseStatement()` as I don't think that a class definition or struct would make much sense, in any case it is what it is for now. I haven't yet activated this though.
Author
Owner

I have now activated it. I am going to have to run some tests though.

Check list

  • Ensure all test cases simple_x.t work
  • Move class definitions, function definitions and struct definitions into parseBody() and out of parseStatement()
    • class definitions
    • struct definitions
    • function definitions Will look at later in #79 or something
I have now activated it. I am going to have to run some tests though. ## Check list - [x] Ensure all test cases `simple_x.t` work - [x] Move class definitions, function definitions and struct definitions into `parseBody()` and **out of** `parseStatement()` - [x] `class` definitions - [x] `struct` definitions - [ ] ~~`function` definitions~~ Will look at later in #79 or something
deavmi started working 2023-01-07 11:26:11 +00:00
deavmi added a new dependency 2023-01-07 11:40:16 +00:00
Author
Owner

Seems as though the test cases are passing.

Seems as though the test cases are passing.
deavmi added the due date 2023-01-11 2023-01-11 08:48:13 +00:00
Author
Owner

Moving function definitions out may take time as its under parseName(). For now, just don't do that.

Moving function definitions out may take time as its under `parseName()`. For now, just don't do that.
Author
Owner

Completed properly with commit eabc300fd346c37313c2ff2499a73fb4c53ba5dc on branch loops.

Completed properly with commit `eabc300fd346c37313c2ff2499a73fb4c53ba5dc` on branch `loops`.
deavmi stopped working 2023-01-11 09:29:16 +00:00
3 days 22 hours
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Total Time Spent: 3 days 22 hours
deavmi
3 days 22 hours
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

2023-01-11

Reference: tlang/tlang#75
No description provided.