parampatterns

Source   Edit  

This module implements the pattern matching features for term rewriting macro support.

Types

TAliasRequest = enum
  aqNone = 1, aqShouldAlias, aqNoAlias
Source   Edit  
TAssignableResult = enum
  arNone, arLValue, arLocalLValue, arDiscriminant, arAddressableConst,
  arLentValue, arStrange
Source   Edit  
TSideEffectAnalysis = enum
  seUnknown, seSideEffect, seNoSideEffect
Source   Edit  

Consts

MaxStackSize = 64
max required stack size by the VM Source   Edit  

Procs

proc checkForSideEffects(n: PNode): TSideEffectAnalysis {.
    ...raises: [ValueError, IOError, KeyError, OSError, Exception],
    tags: [WriteIOEffect, ReadEnvEffect, ReadIOEffect, RootEffect], forbids: [].}
Source   Edit  
proc exprRoot(n: PNode; allowCalls = true): PSym {....raises: [], tags: [],
    forbids: [].}
Source   Edit  
proc isAssignable(owner: PSym; n: PNode): TAssignableResult {....raises: [
    ValueError, IOError, KeyError, OSError, Exception, ERecoverableError],
    tags: [WriteIOEffect, ReadEnvEffect, ReadIOEffect, RootEffect], forbids: [].}
Source   Edit  
proc isLValue(n: PNode): bool {....raises: [ValueError, IOError, KeyError, OSError,
    Exception, ERecoverableError], tags: [WriteIOEffect, ReadEnvEffect,
    ReadIOEffect, RootEffect], forbids: [].}
Source   Edit  
proc matchNodeKinds(p, n: PNode): bool {....raises: [ValueError, IOError, KeyError,
    OSError, Exception, ERecoverableError],
    tags: [WriteIOEffect, ReadEnvEffect, ReadIOEffect, RootEffect], forbids: [].}
Source   Edit  
proc semNodeKindConstraints(n: PNode; conf: ConfigRef; start: Natural): PNode {.
    ...raises: [Exception, ValueError, KeyError, IOError, ERecoverableError], tags: [
    RootEffect, ReadDirEffect, WriteIOEffect, ReadIOEffect, ReadEnvEffect],
    forbids: [].}
does semantic checking for a node kind pattern and compiles it into an efficient internal format. Source   Edit  
proc whichAlias(p: PSym): TAliasRequest {.
    ...raises: [ValueError, IOError, KeyError, OSError, Exception],
    tags: [WriteIOEffect, ReadEnvEffect, ReadIOEffect, RootEffect], forbids: [].}
Source   Edit