class Coverage::SourceFile
- Coverage::SourceFile
- Crystal::Visitor
- Reference
- Object
Included Modules
Defined in:
coverage/inject/source_file.crConstructors
Class Method Summary
- .already_covered_file_name
- .cover_file(file, &)
- .file_list
- .final_operations
- .outputter : String
- .outputter=(outputter : String)
- .prelude_operations
- .project_path : String
- .project_path? : String | Nil
- .register_file(f)
- .relative_path_to_project(path)
- .require_expanders
- .use_require : String
- .use_require=(use_require : String)
Instance Method Summary
- #already_covered_locations : Set(Crystal::Location?)
- #astree : Crystal::ASTNode
- #astree? : Crystal::ASTNode | Nil
- #enriched_source : String
- #enriched_source? : String | Nil
- #id : Int32
- #inject_cover(node : Crystal::ASTNode)
- #lines : Array(Int32)
- #md5_signature : String
- #path : String
-
#process
Inject in AST tree if required.
- #required_at : Int32
- #source : String
- #to_covered_source
-
#visit(node : Crystal::Require)
Management of required file is nasty and should be improved Since I've hard time to replace node on visit, I change the file argument to a number linked to an array of files Then on finalization, we replace each require "xxx" by the proper file.
-
#visit(node : Crystal::OpAssign | Crystal::BinaryOp)
Do not visit sub elements of inlined computations
- #visit(node : Crystal::Arg)
-
#visit(node : Crystal::Assign)
Placeholder for bug #XXX
- #visit(node : Crystal::Expressions)
- #visit(node : Crystal::Block | Crystal::While)
- #visit(node : Crystal::MacroExpression)
- #visit(node : Crystal::MacroLiteral)
- #visit(node : Crystal::MacroIf)
- #visit(node : Crystal::MacroFor)
- #visit(node : Crystal::MacroVar)
- #visit(node : Crystal::Asm)
- #visit(node : Crystal::Def)
- #visit(node : Crystal::Select)
- #visit(node : Crystal::Case)
- #visit(node : Crystal::If)
- #visit(node : Crystal::Unless)
-
#visit(node : Crystal::ASTNode)
Ignore other nodes for now
- #visit(node : Macro)
Instance methods inherited from module MacroUtils
propagate_location_in_macro(node : Crystal::ASTNode, location : Nil)propagate_location_in_macro(node : Crystal::Nop, location : Crystal::Location)
propagate_location_in_macro(node : Crystal::MacroIf, location : Crystal::Location)
propagate_location_in_macro(node : Crystal::MacroFor, location : Crystal::Location)
propagate_location_in_macro(node : Crystal::MacroLiteral, location : Crystal::Location)
propagate_location_in_macro(node : Crystal::Expressions, location)
propagate_location_in_macro(node : Crystal::ASTNode, location : Crystal::Location) propagate_location_in_macro
Constructor Detail
Class Method Detail
Instance Method Detail
def visit(node : Crystal::Require)
#
Management of required file is nasty and should be improved Since I've hard time to replace node on visit, I change the file argument to a number linked to an array of files Then on finalization, we replace each require "xxx" by the proper file.
def visit(node : Crystal::OpAssign | Crystal::BinaryOp)
#
Do not visit sub elements of inlined computations