[Nix-dev] More error locations - nixexpr-ast.def ..

Marc Weber marco-oweber at gmx.de
Sun Jul 22 19:40:19 CEST 2007


I've choosen to make some difference between
  a) noPos (no position can be given/ is implemented)
  b) position is omitted for efficiency (sharing etc)
     the option to enable is called

       bool moreErrorLocations

      and I've put it into globals.{hh,c}

      I'm not sure wether this is the perfect place to put it?

nixexpr-ast.def:
    Pos | string int int | Pos |
    NoPos | | Pos |
  + OmittedPosForSpeedReasons | | Pos |

In parser.c:
  + #define CUR_POS makeCurPos(yylocp, data)
    #define CUR_POS_MORE ( moreErrorLocations ? CUR_POS : makeOmittedPosForSpeedReasons() )


My trouble now is that when not enabling the extension I'm getting this
error message:
  error: position expected, in `OmittedPosForSpeedReasons'

I think it has a simple reason you can tell me without thinking?
If not I'll start debugging etc.

Is there another executable to add this option to but nix-env
nix-instantiate?

Marc Weber



More information about the nix-dev mailing list