Commit graph

11 commits

Author SHA1 Message Date
Russell Joyce 97030639f1
Fixed for loop initialisers with variable declarations 2020-06-18 19:18:14 +01:00
Russell Joyce 9d2327b8be
Added support for commas in for loop initialiser statement 2020-06-18 18:41:27 +01:00
Russell Joyce 7b43483f68
Added handling of "short int" type specifier
Just consumes and discards the "int" token and treats as if it was only
a "short".
2020-06-18 17:20:02 +01:00
Russell Joyce 3979f563aa
Added support for commas in for loop update statement 2020-06-18 17:05:10 +01:00
Russell Joyce d04337125e
Added support for extern variable declarations
Effectively just ignores any declarations as global scope is shared
across files in PicoC anyway, so the ultimate definition should be
enough.
2020-06-17 19:57:10 +01:00
Russell Joyce 5261facbd7
Fixed bug with typedef, introduced with extra type qualifier parsing
Caused by overwriting the value of the actual type token being parsed by
any following tokens that were examined or consumed, rather than just
ignoring their values.
2020-06-12 15:33:19 +01:00
Russell Joyce 62969cb0ee
Added handling of 'const' type qualifier keyword
There is currently no enforcement of a variable being constant, and the
actual type is the same as if 'const' wasn't present.
2020-06-11 11:30:51 +01:00
Russell Joyce b403e76600
Added handling of trailing type qualifiers/storage classes
Handles situations such as `int volatile x` rather than `volatile int x`
by consuming the keywords as part of the type specifier.
2020-06-10 18:21:35 +01:00
Russell Joyce 9abf00e2d3
Added basic pragma parsing
Actual contents of the pragma are currently just discarded. This
supports both #pragma and _Pragma() definitions, but the pragma must end
the line it is on and cannot be in the middle of a statement.
2020-06-09 19:21:00 +01:00
Russell Joyce 2597008035
Small modification to loop C test code 2020-06-09 12:31:20 +01:00
Russell Joyce 72dff522b3
Added some basic example C files for use with debugging/testing 2020-05-13 18:01:14 +01:00