Skip to content

Commit

Permalink
make sure '- key: value' is parsed
Browse files Browse the repository at this point in the history
  • Loading branch information
pwbh committed Aug 31, 2024
1 parent 4e8dae1 commit 9f915eb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 14 deletions.
21 changes: 9 additions & 12 deletions resources/tutorial.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,12 @@ education: |
3 A-Levels
BSc in the Internet of Things
tutorial:
- yml:
name: "YAML Ain't Markup Language"
type: awesome
born: 2001
- json:
name: JavaScript Object Notation
type: great
born: 2001
- xml:
name: Extensible Markup Language
type: good
born: 1996
- name: "YAML Ain't Markup Language"
type: awesome
born: 2001
- name: JavaScript Object Notation
type: great
born: 2001
- name: Extensible Markup Language
type: good
born: 1996
2 changes: 1 addition & 1 deletion src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const Program = struct {
vs: Details,
};

const Shader = struct { slang: []const u8, programs: struct {} };
const Shader = struct { slang: []const u8, programs: []Program };

const Experiment = struct {
shaders: []Shader,
Expand Down
2 changes: 1 addition & 1 deletion src/root.zig
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,9 @@ pub fn Ymlz(comptime Destination: type) type {

while (true) {
const raw_value_line = try self.readLine() orelse break;
self.suspensed = raw_value_line;

if (self.isNewExpression(raw_value_line, depth)) {
self.suspensed = raw_value_line;
break;
}

Expand Down

0 comments on commit 9f915eb

Please sign in to comment.