Skip to content

Commit

Permalink
fix(lib): fix linereader
Browse files Browse the repository at this point in the history
please refer to the work log for details
  • Loading branch information
CLimber-Rong committed Jul 15, 2024
1 parent 6a46e10 commit 758673f
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 2 deletions.
Binary file added a.stvc
Binary file not shown.
Binary file modified demos/demo.stvc
Binary file not shown.
Binary file modified demos/demo1.stvc
Binary file not shown.
Binary file modified demos/demo2.stvc
Binary file not shown.
2 changes: 1 addition & 1 deletion doc/工作日志/20240714.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 2024/07/12 工作日志
# 2024/07/14 工作日志

本次并没有提交新功能。

Expand Down
16 changes: 16 additions & 0 deletions doc/工作日志/20240715.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# 2024/07/15 工作日志

本次并没有提交新功能。

### 撤回了部分02024/7/14的更改

修复了LineReader,解决了无法读取文件的问题。

### 接下来要做的事

1. 支持文件处理库
2. 支持编译为平面字节码
3. 编写词法分析的保存功能
4. 编写AST的O1优化器
5. 完善标准库
6. 编写AST的解释器
2 changes: 1 addition & 1 deletion include/stdc_implemented/LineReader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class LineReader {

if(fseek(stream, 0, SEEK_SET)!=0) FILE_ERR;

if(fread(buffer, 1, size+1, stream)!=size) FILE_ERR;
fread(buffer, 1, size+1, stream);

String text = String(buffer);

Expand Down

0 comments on commit 758673f

Please sign in to comment.