compiler/sourcemap

  Source   Edit

Types

Child = ref object
  case kind*: C
  of cSourceNode:
      node*: SourceNode

  of cSourceString:
      s*: string

  
  Source   Edit
Mapping = ref object
  source*: string
  original*: tuple[line: int, column: int]
  generated*: tuple[line: int, column: int]
  name*: string
  noSource*: bool
  noName*: bool
  Source   Edit
SourceMap = ref object
  version*: int
  sources*: seq[string]
  names*: seq[string]
  mappings*: string
  file*: string
  Source   Edit
SourceNode = ref object
  line*: int
  column*: int
  source*: string
  name*: string
  children*: seq[Child]
  Source   Edit

Procs

proc `$`(sourceNode: SourceNode): string {....raises: [ValueError], tags: [].}
  Source   Edit
proc addMapping(map: SourceMapGenerator; mapping: Mapping) {....raises: [],
    tags: [].}
  Source   Edit
proc child(node: SourceNode): Child {....raises: [], tags: [].}
  Source   Edit
proc child(s: string): Child {....raises: [], tags: [].}
  Source   Edit
proc encode(i: int): string {....raises: [], tags: [].}
  Source   Edit
proc gen(map: SourceMapGenerator): SourceMap {....raises: [], tags: [].}
  Source   Edit
proc genSourceMap(source: string; outFile: string): (Rope, SourceMap) {.
    ...raises: [ValueError, Exception], tags: [RootEffect].}
  Source   Edit
proc index[T](elements: seq[T]; element: T): int
  Source   Edit
proc parse(source: string; path: string): SourceNode {....raises: [ValueError],
    tags: [].}
  Source   Edit
proc text(sourceNode: SourceNode; depth: int): string {....raises: [ValueError],
    tags: [].}
  Source   Edit
proc toSourceMap(node: SourceNode; file: string): SourceMapGenerator {.
    ...raises: [Exception], tags: [RootEffect].}
  Source   Edit
proc walk(node: SourceNode; fn: proc (line: string; original: SourceNode)) {.
    ...raises: [Exception], tags: [RootEffect].}
  Source   Edit

Iterators

iterator tokenize(line: string): (bool, string) {....raises: [], tags: [].}
  Source   Edit