Ticket #57 (assigned enhancement)

Opened 2 months ago

Last modified 2 months ago

Provide a trace form without position info

Reported by: hopscc Owned by: Chuck
Priority: medium Milestone:
Component: Cobra Compiler Version: 0.8.0
Keywords: Cc:

Description

Originally from ticket:32.
Support trace forms that

a) dont display line position info (for easier tracking of expr values where code position is not interesting)

b) display only an expressions value (rather than 'expr'=expr form) for providing simple text and interpolated strings in traces

Attachments

trace-no-posn.patch (3.5 kB) - added by hopscc 2 months ago.

Change History

Changed 2 months ago by hopscc

Changed 2 months ago by hopscc

  • owner set to Chuck
  • status changed from new to assigned

Hack to allow suppression of posn info in traces and display only expr value
Change to CobraLang.cobra runtime

support '-noPosition' or '-at' as first expr to trace as switch to make it not emit position info ( read short form as 'minus at' from position info being 'at <file>:<line> in <method>)
e.g

trace '-noPosition', x
trace '-at', x

support '-noExprEq' or '-=' as a switch before an expression to suppress 'expr'=<expr> display in favor of just <expr>. ( read short form as 'minus equals')
e.g.

trace '-noExprEq' 'SEARCH_TAG', x
trace '-=', 'x interpolates to [x]'
trace '-at', '-=', probe [count]', '-=', x 

augmented 900-trace.cobra test file

Note: See TracTickets for help on using tickets.