make bare sequences worth with Entry

This commit is contained in:
Robin Appelman 2025-03-01 15:32:22 +01:00
commit d29d06166c
10 changed files with 145 additions and 24 deletions

View file

@ -250,6 +250,7 @@ fn test_serde_table(path: &str) {
fn test_serde_from_table(path: &str) {
let raw = read_to_string(path).unwrap();
let result = Table::load_from_str(&raw).unwrap();
dbg!(&result);
let material: Expected = from_entry(result.into()).expect("table to material");
insta::assert_ron_snapshot!(format!("table_to_material__{}", path), material);

View file

@ -4,8 +4,11 @@ expression: parsed
---
{
"Resource/specificPanel.res": {
"$envmaptint": ".5",
".5": ".5",
"$envmaptint": [
".5",
".5",
".5",
],
"\\\\\"$translucent\"": "1",
"array": [
"1",

View file

@ -11,6 +11,5 @@ r#Resource/specificPanel.res(
],
windows_path: "C:\\test\\no newline",
r#\\"$translucent": true,
r#$envmaptint: 0.5,
r#.5: 0.5,
r#$envmaptint: (0.5, 0.5, 0.5),
)

View file

@ -12,4 +12,5 @@ Types(
single: 1.2,
triple: (1.2, 1.3, 1.4),
single_int: 2.0,
another_tuple: (8, "foo", false),
)