Module src_ref

Module src_ref 

Source
Expand description

Source code references.

All errors which occur while parsing or evaluating µcad code need to be reported and therefore need to address a place in the code where they did appear. A bunch of structs from this module provide this functionality:

  • SrcRef boxes a SrcRefInner which itself includes all necessary reference information like line/column and a hash to identify the source file.
  • Refer encapsulates any syntax element and puts a SrcRef beside it.
  • SrcReferrer is a trait which provides unified access to the SrcRef (e.g. implemented by Refer).

Structs§

LineCol
Line and column within a source code file
Refer
Packs any value together with a source reference
SrcRef
Reference into a source file.
SrcRefInner
A reference into the source code

Traits§

SrcReferrer
Elements holding a source code reference shall implement this trait