PLC-lang / rusty

Structured Text Parser and LLVM Frontend
GNU Lesser General Public License v3.0
221 stars 53 forks source link

Add validation for hardware access #1292

Open ghaith opened 2 months ago

ghaith commented 2 months ago

We should add a validation to prevent/warn the user when accessing a hardware variable in the wrong direction i.e Reading an I variable or writing a Q variable

Originally posted by @mhasel in https://github.com/PLC-lang/rusty/issues/1265#issuecomment-2326415624

tisis2 commented 2 months ago

Q is always bidirectional and is also allowed to be read and should not produce any error or warning. I should be an error when tryed to be written to