Skip to content

Commit

Permalink
address some TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
xonixx committed Aug 19, 2022
1 parent 20611e9 commit ce1ea53
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions goawk.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ const (
-v var=value variable assignment (multiple allowed)
Additional GoAWK arguments:
-covermode mode TODO
-coverprofile file TODO
-covermode mode set the coverage report mode (set/count)
-coverprofile file set the coverage report filename
-cpuprofile file write CPU profile to file
-d print parsed syntax tree to stderr (debug mode)
-da print virtual machine assembly instructions to stderr
Expand Down
9 changes: 4 additions & 5 deletions parser/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,6 @@ type parser struct {
prevTok Token // previously lexed token
val string // string value of last token (or "")

startPos Position

// Parsing state
inAction bool // true if parsing an action (false in BEGIN or END)
funcName string // function name if parsing a func, else ""
Expand All @@ -155,9 +153,10 @@ type parser struct {
debugTypes bool // show variable types for debugging
debugWriter io.Writer // where the debug output goes

// TODO describe
currentFileName string
fileStartPos Position
// Coverage report functionality
startPos Position // The start position of each parser node that is a subject of the coverage analysis. Needed to capture the boundary data for such nodes.
currentFileName string // The name of a file (passed via -f, multiple files can be provided) being processed by parser
fileStartPos Position // We keep the position where each file content starts in the joined AWK source
}

func (p *parser) markStartPos() {
Expand Down

0 comments on commit ce1ea53

Please sign in to comment.