Skip to content
New issue

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

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

Already on GitHub? # to your account

Prepend identifiers with _ when they begin with digit. #20

Merged
merged 1 commit into from
Jul 17, 2024

Conversation

daniel-yeow
Copy link

Using ./bin/dict_generator -output example/diam/const.js -dictionary dict/extra.xml generates a dictionary that contains

 // Rx
    5GSRANNASReleaseCause:                        572,
    5GMMCause:                                    573,
    5GSMCause:                                    574,

which eventually results with syntax

SyntaxError: file:///mnt/example/diam/const.js: Identifier directly after number (637:5)
  635 |     ExtendedAPNAMBRUL:                            2849,
  636 |     // Rx
> 637 |     5GSRANNASReleaseCause:                        572,
      |      ^
  638 |     5GMMCause:                                    573,
  639 |     5GSMCause:                                    574,
  640 |     NGAPCause:                                    575,
        at <internal/k6/compiler/lib/babel.min.js>:7:10099(24)

Prepending with _ will solve that problem for any digit.

@lwlee2608 lwlee2608 merged commit 7b6fd11 into MATRIXXSoftware:main Jul 17, 2024
2 checks passed
@lwlee2608
Copy link
Contributor

Thanks!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants