Skip to content

Latest commit

 

History

History
56 lines (40 loc) · 1.34 KB

README.md

File metadata and controls

56 lines (40 loc) · 1.34 KB

"Count" Dracula

A parser + utils for counting lines and figuring out their meaningfulness for better line counting API.

Can identify lines based on the following criteria:

  • Blank, (contains only whitespace)
  • Meaningless (has no impact on the code, e.g. braces, comments, etc.)
  • Comment (number of lines with comments)
  • String (strings, language strings, raw strings, literal strings, format strings, etc.)
  • Source (the actual code)

How to run?

Tentative, planned to be made into a library + binary.

The APIs for use as libraries are WIP.

# to test
cargo test

# to run as a dumb util
cargo run -- <rust|python|cpp|c> /path/to/file

Table of Contents

Key Goals

  • General enough to work over any language.
  • Performant enough to work with as many files as possible, and allow scanning huge files.
  • Pull Parsing for lazy parsing of the code to allow flexible usage.

Works with

  • C & C++
  • Python
  • Rust
  • etc...

Dependencies

Default runtime dependencies: None.

Rust version dependencies:1.59.0 (Could possibly work with older Rust versions)

Development

Credits