class Crst::PositionScanner

Overview

Traverses the AST and assigns line/column info to nodes by finding them in content.

Defined in:

crst/position_scanner.cr

Constructors

Instance Method Summary

Instance methods inherited from class Crst::Visitor

process(node : Crst::Node) process, visit(node : Crst::Node) visit

Constructor Detail

def self.new(content : String) #

[View source]

Instance Method Detail

def process(node : Node) #
Description copied from class Crst::Visitor

Logic to perform on each node.


[View source]
def reset(new_content : String | Nil = nil) #

Resets internal state so the scanner can be reused on a different document.


[View source]
def scan(doc : Node) #

[View source]