Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update vba.g4 #3880

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions vba/examples/example8_lineNumbers.bas
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ Dim Number, MyString
MyString = "Number equals 2"
3:
Debug.Print MyString
4: Debug.Print "TEST"
Copy link
Contributor

@kaby76 kaby76 Jan 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change doesn't test the changed grammar rule "lineLabel". There's not a single test that has "lineLabel".

01/26-05:00:52 ~/issues/g4-3880/vba/Generated-CSharp
$ trparse ../examples/*.bas | trxgrep ' //lineLabel' | trtext -c
CSharp 0 ../examples/example09_typeHints.bas success 0.3759407
CSharp 0 ../examples/example1.bas success 0.0414117
CSharp 0 ../examples/example2operators.bas success 0.1742185
CSharp 0 ../examples/example3erase.bas success 0.0385953
CSharp 0 ../examples/example4fixedstring.bas success 0.006915
CSharp 0 ../examples/example5property.bas success 0.0179688
CSharp 0 ../examples/example6dateliteral.bas success 0.0156073
CSharp 0 ../examples/example7linecontinuation.bas success 0.3410573
CSharp 0 ../examples/example8_lineNumbers.bas success 0.3330462
../examples/example09_typeHints.bas:0
../examples/example1.bas:0
../examples/example2operators.bas:0
../examples/example3erase.bas:0
../examples/example4fixedstring.bas:0
../examples/example5property.bas:0
../examples/example6dateliteral.bas:0
../examples/example7linecontinuation.bas:0
../examples/example8_lineNumbers.bas:0
01/26-05:03:05 ~/issues/g4-3880/vba/Generated-CSharp
$

Here's a "coverage heat map" for the tests (rename to cover.html and view in an internet browser).
cover.html.txt

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was wondering if there was a way to see coverage. Unfortunately, removing the ‘.txt’ just gives a 404 error.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Download cover.html.txt (I just tried the link, it works). Save it on disk. Rename cover.html.txt to cover.html in a command-line shell. Open a browser and click to open cover.html.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kaby76 Do you know if there is a way to see the coverage file from a working branch on GitHub? I’m adding examples and want to see which tokens I’m missing along the way.
I’m used to sending coverage reports to coveralls.io.
Thanks!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage is not run in the Github Actions build because it is time consuming. #3624

You'll have to run it locally on your machine.

End Sub
4 changes: 2 additions & 2 deletions vba/vba.g4
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ letterrange
;

lineLabel
: ambiguousIdentifier ':'
: ambiguousIdentifier ':' WS?
;

literal
Expand Down Expand Up @@ -2010,4 +2010,4 @@ fragment HEXDIGIT

fragment LETTERORDIGIT
: [A-Z0-9_\p{L}]
;
;
Loading