mirror of
https://github.com/irmen/prog8.git
synced 2024-10-18 01:24:51 +00:00
improve ast check on pipe expressions
This commit is contained in:
parent
7dbff5b9e6
commit
0f4a197e34
@ -1103,9 +1103,15 @@ internal class AstChecker(private val program: Program,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun visit(pipe: PipeExpression) = process(pipe)
|
override fun visit(pipe: PipeExpression) {
|
||||||
|
process(pipe)
|
||||||
|
super.visit(pipe)
|
||||||
|
}
|
||||||
|
|
||||||
override fun visit(pipe: Pipe) = process(pipe)
|
override fun visit(pipe: Pipe) {
|
||||||
|
process(pipe)
|
||||||
|
super.visit(pipe)
|
||||||
|
}
|
||||||
|
|
||||||
private fun process(pipe: IPipe) {
|
private fun process(pipe: IPipe) {
|
||||||
if(pipe.source in pipe.segments)
|
if(pipe.source in pipe.segments)
|
||||||
|
@ -3,7 +3,6 @@ TODO
|
|||||||
|
|
||||||
For next release
|
For next release
|
||||||
^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^
|
||||||
- "999 as ubyte" won't be const folded away and gives compiler crash
|
|
||||||
- pipe operator: allow non-unary function calls in the pipe that specify the other argument(s) in the calls.
|
- pipe operator: allow non-unary function calls in the pipe that specify the other argument(s) in the calls.
|
||||||
- createAssemblyAndAssemble(): make it possible to actually get rid of the VarDecl nodes by fixing the rest of the code mentioned there.
|
- createAssemblyAndAssemble(): make it possible to actually get rid of the VarDecl nodes by fixing the rest of the code mentioned there.
|
||||||
- allow "xxx" * constexpr (where constexpr is not a number literal), now gives expression error not same type
|
- allow "xxx" * constexpr (where constexpr is not a number literal), now gives expression error not same type
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
|
|
||||||
main {
|
main {
|
||||||
sub start() {
|
sub start() {
|
||||||
|
|
||||||
uword qq = 999 as ubyte |> abs() |> abs()
|
uword qq = 999 as ubyte |> abs() |> abs()
|
||||||
txt.print_uw(qq)
|
txt.print_uw(qq)
|
||||||
txt.nl()
|
txt.nl()
|
||||||
|
Loading…
Reference in New Issue
Block a user