dhscanner-ast-0.1.0.2: abstract syntax tree for multiple programming languages
Safe HaskellSafe-Inferred
LanguageHaskell2010

Location

Description

  • Locations exist for all "code entities"

    • variables
    • function calls
    • function definitions
    • while loops
    • etc.
  • Locations are constructed only during parsing

    • users should not construct locations
  • Locations help to present security findings to users
  • In addition, locations are used as primary keys in the container database

    • more precisely, locations are variables in the resulting Prolog program
    • each location corresponds to exactly one "code entity"
    • this is why users should never construct locations
    • it is completely the parser's job !
Synopsis

Documentation

data Location Source #

Lines and columns are 1-based, like in most IDEs.

Constructors

Location 

Fields

Instances

Instances details
FromJSON Location Source # 
Instance details

Defined in Location

ToJSON Location Source # 
Instance details

Defined in Location

Generic Location Source # 
Instance details

Defined in Location

Associated Types

type Rep Location :: Type -> Type

Methods

from :: Location -> Rep Location x

to :: Rep Location x -> Location

Show Location Source # 
Instance details

Defined in Location

Methods

showsPrec :: Int -> Location -> ShowS

show :: Location -> String

showList :: [Location] -> ShowS

Eq Location Source # 
Instance details

Defined in Location

Methods

(==) :: Location -> Location -> Bool

(/=) :: Location -> Location -> Bool

Ord Location Source # 
Instance details

Defined in Location

Methods

compare :: Location -> Location -> Ordering

(<) :: Location -> Location -> Bool

(<=) :: Location -> Location -> Bool

(>) :: Location -> Location -> Bool

(>=) :: Location -> Location -> Bool

max :: Location -> Location -> Location

min :: Location -> Location -> Location

type Rep Location Source # 
Instance details

Defined in Location

type Rep Location = D1 ('MetaData "Location" "Location" "dhscanner-ast-0.1.0.2-inplace" 'False) (C1 ('MetaCons "Location" 'PrefixI 'True) ((S1 ('MetaSel ('Just "filename") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath) :*: S1 ('MetaSel ('Just "lineStart") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word)) :*: (S1 ('MetaSel ('Just "lineEnd") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word) :*: (S1 ('MetaSel ('Just "colStart") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word) :*: S1 ('MetaSel ('Just "colEnd") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word)))))