mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-11-20 13:10:07 -08:00
eval2: first pass at c recursive type expression parsing
This commit is contained in:
1 parent
f1f654ecfd
commit
fdbcf7ccdc
6 files changed
+285
-108
No files matched your search
+22
-17
@@ -43,46 +43,51 @@ entry_point(CmdLine *cmdline)
|
||||
// (A)
|
||||
// int & B
|
||||
// (1 + (int)&B)
|
||||
s("int32[100]"),
|
||||
|
||||
// TODO(rjf): this is now busted, `mul` root comes out - related to always having a top task maybe?
|
||||
s("3 * 4 + 2"),
|
||||
s("(3 * 4) + 2"),
|
||||
s("3 * 4"),
|
||||
s("foo"),
|
||||
s("foo.bar"),
|
||||
s("[123]"),
|
||||
s("123[456]"),
|
||||
s("2 + (3 * 4)"),
|
||||
s("int32 == int32"),
|
||||
s("123, 456"),
|
||||
s("222.f"),
|
||||
s("123 as float32"),
|
||||
s("int32 (*) [100]"),
|
||||
s("int32[100]"),
|
||||
s("cast float32 123"),
|
||||
s("cast (float32) 123"),
|
||||
s("(int32 *)123"),
|
||||
s("bar(a, b) = a + b"),
|
||||
s("123, 456"),
|
||||
s("int32 == int32"),
|
||||
s("foo = 123"),
|
||||
s("1 > 2"),
|
||||
s("1 ? 123 : 456"),
|
||||
s("0 ? 123 : 456"),
|
||||
s("1 ? \"Test\" : 888"),
|
||||
s("'a'"),
|
||||
s("'b'"),
|
||||
s("float32(111)"),
|
||||
s("float64(111)"),
|
||||
s("222.f"),
|
||||
s("222.0"),
|
||||
s("(float32)222"),
|
||||
s("(float64)222"),
|
||||
s("[123]"),
|
||||
s("foo"),
|
||||
s("foo.bar"),
|
||||
s("123[456]"),
|
||||
s("222.0"),
|
||||
s("123"),
|
||||
s("123 + 456"),
|
||||
s("!1"),
|
||||
s("!0"),
|
||||
s("1 + 1 + 1"),
|
||||
s("40 / 0"),
|
||||
s("3 * 4"),
|
||||
s("3 * 4 + 2"),
|
||||
s("(3 * 4) + 2"),
|
||||
s("2 + (3 * 4)"),
|
||||
s("123 | 456"),
|
||||
s("123 + "),
|
||||
s("-123"),
|
||||
s("sizeof 123"),
|
||||
s("1 ? 123 : 456"),
|
||||
s("0 ? 123 : 456"),
|
||||
s("123(1, 2, 3)"),
|
||||
#if 0
|
||||
// s("float32(111)"),
|
||||
// s("float64(111)"),
|
||||
#endif
|
||||
};
|
||||
for EachElement(idx, strings)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user