<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html><body style='font-size: 14pt; font-family: Verdana,Geneva,sans-serif'>
<p>For C codegen they are there so that any problems that spill back into the generated code can be reported properly. Rare, given that it's a code generator, but useful when you're doing ragel development. Also, there can be environmental factors that trigger a problem in the generated code, such as a define.</p>
<p>I don't know GO well enough to say that's important there as well.</p>
<p>On 2018-05-15 11:17, Dmitry Savintsev wrote:</p>
<blockquote type="cite" style="padding-left:5px; border-left:#1010ff 2px solid; margin-left:5px"><!-- html ignored --><!-- head ignored --><!-- meta ignored -->
<div dir="ltr">
<div>What is the meaning and intended usage of `//line filename.go` directives in the Go code generated by ragel? I understand that '//line filename.rl' references can help to trace back the origin of the statements, but don't yet see the significance or intended usage of the .go file references.</div>
<div> </div>
<div>-L directive is applicable only to C/D/Ruby/C#/OCaml - I wonder if it would be difficult to enable it for Go as well?  The '//line' directives seem to confuse the `go test -cover` command into producing invalid data (and then an internal error like "cover: inconsistent NumStmt: changed from 3 to 2").  I am using ragel version 6.10 (on a Mac).</div>
<div> </div>
<div>The workaround I'm using is removing the `//line` lines from the generated .go file:</div>
<div>sed -i '' /^\/\/line\.*/d filename.go</div>
<div> </div>
<div>Many thanks,</div>
<div> </div>
<div>Dmitry</div>
</div>
<br />
<pre>_______________________________________________
ragel-users mailing list
<a href="mailto:ragel-users@colm.net">ragel-users@colm.net</a>
<a href="http://www.colm.net/cgi-bin/mailman/listinfo/ragel-users">http://www.colm.net/cgi-bin/mailman/listinfo/ragel-users</a>
</pre>
</blockquote>
</body></html>