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

Type-safe ParseErrors #14320

Merged
merged 104 commits into from Mar 8, 2022
Merged

Type-safe ParseErrors #14320

merged 104 commits into from Mar 8, 2022

Commits on Mar 7, 2022

  1. Flow ParseError version.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    ad551b6 View commit details
    Browse the repository at this point in the history
  2. Begin updating everything.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    9d5bf3a View commit details
    Browse the repository at this point in the history
  3. Convert more.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    11794cb View commit details
    Browse the repository at this point in the history
  4. Add more.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    ee2037f View commit details
    Browse the repository at this point in the history
  5. Fix.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    6a339a1 View commit details
    Browse the repository at this point in the history
  6. Just switch everything to exact types.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    bb7d02b View commit details
    Browse the repository at this point in the history
  7. Style fixes.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    50e259a View commit details
    Browse the repository at this point in the history
  8. Copy the full SHA
    9e5643d View commit details
    Browse the repository at this point in the history
  9. Don't use enums and address more issues.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    7b0b990 View commit details
    Browse the repository at this point in the history
  10. More fixes.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    fbd4765 View commit details
    Browse the repository at this point in the history
  11. Workaround for import situation.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    5725a17 View commit details
    Browse the repository at this point in the history
  12. Fix a bunch of errors messages.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    9c1fe56 View commit details
    Browse the repository at this point in the history
  13. Fix some flow stuff.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    193f473 View commit details
    Browse the repository at this point in the history
  14. Add a way to specify code.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    c788091 View commit details
    Browse the repository at this point in the history
  15. Fix lint errors.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    78e9eb3 View commit details
    Browse the repository at this point in the history
  16. Fix Flow errors.

    Reviewed by @tolmasky.
    
    Another Flow things.
    
    Reviewed by @tolmasky.
    
    Fix Flow error.
    
    Reviewed by @tolmasky.
    
    Fix flow errors.
    
    Reviewed by @tolmasky.
    
    Fix flow error.
    
    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    8c3c405 View commit details
    Browse the repository at this point in the history
  17. See if this gets the name right.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    2d6868d View commit details
    Browse the repository at this point in the history
  18. Add comments to raise and raiseOverwrite.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    fc112ee View commit details
    Browse the repository at this point in the history
  19. Remove forward declaration.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    6b21909 View commit details
    Browse the repository at this point in the history
  20. Change option to be kind.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    774c78b View commit details
    Browse the repository at this point in the history
  21. Copy the full SHA
    c8ac0f5 View commit details
    Browse the repository at this point in the history
  22. Make IllegalBreakContinue based on type.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    3d08b30 View commit details
    Browse the repository at this point in the history
  23. Begin moving checkLVal to type-based system instead of contextDescrip…

    …tion-based system, and fix let error in the process as well.
    
    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    fd50741 View commit details
    Browse the repository at this point in the history
  24. Switch to isValidLVal.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    b8eb3ce View commit details
    Browse the repository at this point in the history
  25. Don't use checkLVal for class names.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    455512e View commit details
    Browse the repository at this point in the history
  26. Fix some Flow errors.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    b040a52 View commit details
    Browse the repository at this point in the history
  27. Temporary fix for Flow error.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    833d631 View commit details
    Browse the repository at this point in the history
  28. Remove unused stuff.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    dd74fc7 View commit details
    Browse the repository at this point in the history
  29. Try this.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    c5c21c5 View commit details
    Browse the repository at this point in the history
  30. Don't use Object.fromEntries.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    afefe3a View commit details
    Browse the repository at this point in the history
  31. Fix linter error.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    ee26f35 View commit details
    Browse the repository at this point in the history
  32. Fix for SyntaxError.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    b10acd0 View commit details
    Browse the repository at this point in the history
  33. Copy the full SHA
    2608cdd View commit details
    Browse the repository at this point in the history
  34. Copy the full SHA
    1f908f4 View commit details
    Browse the repository at this point in the history
  35. Allow consts with literals.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    b169766 View commit details
    Browse the repository at this point in the history
  36. Add enum support.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    c69ee85 View commit details
    Browse the repository at this point in the history
  37. Copy the full SHA
    4fcecf3 View commit details
    Browse the repository at this point in the history
  38. Only ignore reserved words in ambient contexts. Parse interface in pa…

    …rseStatementContent. Fix enums.
    
    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    6fa0c4a View commit details
    Browse the repository at this point in the history
  39. Fix simple parameter error.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    00644ee View commit details
    Browse the repository at this point in the history
  40. Type references should allow reserved words (I believe we were just g…

    …etting away with the fact that we turned reserved words off before).
    
    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    b791955 View commit details
    Browse the repository at this point in the history
  41. Copy the full SHA
    708248b View commit details
    Browse the repository at this point in the history
  42. Copy the full SHA
    6415b84 View commit details
    Browse the repository at this point in the history
  43. Fix for keywords in export as.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    085361f View commit details
    Browse the repository at this point in the history
  44. Fix reserved words in import types.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    7327182 View commit details
    Browse the repository at this point in the history
  45. Rename files.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    624a102 View commit details
    Browse the repository at this point in the history
  46. Add 1

    tolmasky committed Mar 7, 2022
    Copy the full SHA
    5e6a905 View commit details
    Browse the repository at this point in the history
  47. Copy the full SHA
    3db388e View commit details
    Browse the repository at this point in the history
  48. Copy the full SHA
    c9a977b View commit details
    Browse the repository at this point in the history
  49. Fix reading files with different encodings.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    68ed506 View commit details
    Browse the repository at this point in the history
  50. Fix outside tests.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    8f96d64 View commit details
    Browse the repository at this point in the history
  51. Copy the full SHA
    8eb49b9 View commit details
    Browse the repository at this point in the history
  52. Update tests that should fail.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    5ffc234 View commit details
    Browse the repository at this point in the history
  53. Add tests for complex let assignments.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    4632b28 View commit details
    Browse the repository at this point in the history
  54. Choose a better name for these.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    40c51b6 View commit details
    Browse the repository at this point in the history
  55. Copy the full SHA
    c108c7e View commit details
    Browse the repository at this point in the history
  56. Change name to kind.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    660971f View commit details
    Browse the repository at this point in the history
  57. Copy the full SHA
    690c3c3 View commit details
    Browse the repository at this point in the history
  58. Use error credentials and error details.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    e4137ee View commit details
    Browse the repository at this point in the history
  59. Fix some names and add comments.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    e87144f View commit details
    Browse the repository at this point in the history
  60. Get rid of unused option.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    4de1abd View commit details
    Browse the repository at this point in the history
  61. Better names.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    8357cb3 View commit details
    Browse the repository at this point in the history
  62. Copy the full SHA
    f81a139 View commit details
    Browse the repository at this point in the history
  63. Clean up LVal stuff.

    reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    d5522fd View commit details
    Browse the repository at this point in the history
  64. Use "unambiguous" to determine whether to parse typescript tests as m…

    …odule or script, and stop always allowing imports in Typescript.
    
    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    58a7cf8 View commit details
    Browse the repository at this point in the history
  65. Revert test to previous state.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    852b89d View commit details
    Browse the repository at this point in the history
  66. Better name for this.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    7da1432 View commit details
    Browse the repository at this point in the history
  67. Add these back in.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    3cfd9b1 View commit details
    Browse the repository at this point in the history
  68. Add these.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    71c13fb View commit details
    Browse the repository at this point in the history
  69. Copy the full SHA
    e212e22 View commit details
    Browse the repository at this point in the history
  70. Rename LHSParent to LValAncestor.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    50314f6 View commit details
    Browse the repository at this point in the history
  71. Copy the full SHA
    a52943b View commit details
    Browse the repository at this point in the history
  72. Copy the full SHA
    a64ab03 View commit details
    Browse the repository at this point in the history
  73. Fix for using type.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    7af22ea View commit details
    Browse the repository at this point in the history
  74. Better names.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    4af3e28 View commit details
    Browse the repository at this point in the history
  75. Clean up API and add comments.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    75d62ab View commit details
    Browse the repository at this point in the history
  76. Change name.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    124cb19 View commit details
    Browse the repository at this point in the history
  77. Better names.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    fe1daf4 View commit details
    Browse the repository at this point in the history
  78. Minor comment fix.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    2cb6231 View commit details
    Browse the repository at this point in the history
  79. Remove no longer used method.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    9322f3f View commit details
    Browse the repository at this point in the history
  80. Update packages/babel-parser/src/parser/lval.js

    Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
    tolmasky and nicolo-ribaudo committed Mar 7, 2022
    Copy the full SHA
    084d475 View commit details
    Browse the repository at this point in the history
  81. Update packages/babel-parser/src/parser/lval.js

    Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
    tolmasky and nicolo-ribaudo committed Mar 7, 2022
    Copy the full SHA
    b92b541 View commit details
    Browse the repository at this point in the history
  82. Minor grammar changes to comments.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    359da55 View commit details
    Browse the repository at this point in the history
  83. Use trim instead of slice(0, -1).

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    7248dfd View commit details
    Browse the repository at this point in the history
  84. Copy the full SHA
    e7e4393 View commit details
    Browse the repository at this point in the history
  85. Use maxArgumentCount.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    6a418de View commit details
    Browse the repository at this point in the history
  86. Don't allow UpdateExpression without prefix.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    54ddad5 View commit details
    Browse the repository at this point in the history
  87. Add tds test for no-initializer.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    69ec1d3 View commit details
    Browse the repository at this point in the history
  88. Copy the full SHA
    7159c84 View commit details
    Browse the repository at this point in the history
  89. Update packages/babel-parser/src/parser/expression.js

    Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
    tolmasky and nicolo-ribaudo committed Mar 7, 2022
    Copy the full SHA
    28bbe47 View commit details
    Browse the repository at this point in the history
  90. Copy the full SHA
    e0a3615 View commit details
    Browse the repository at this point in the history
  91. Copy the full SHA
    b9206ef View commit details
    Browse the repository at this point in the history
  92. Update packages/babel-parser/src/parse-error.js

    Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
    tolmasky and JLHwung committed Mar 7, 2022
    Copy the full SHA
    4f12b28 View commit details
    Browse the repository at this point in the history
  93. Copy the full SHA
    aa6240f View commit details
    Browse the repository at this point in the history
  94. Copy the full SHA
    dfafab9 View commit details
    Browse the repository at this point in the history
  95. Copy the full SHA
    3803c07 View commit details
    Browse the repository at this point in the history
  96. Copy the full SHA
    bcc473e View commit details
    Browse the repository at this point in the history
  97. Update packages/babel-parser/src/parser/lval.js

    Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
    tolmasky and nicolo-ribaudo committed Mar 7, 2022
    Copy the full SHA
    b6ca63f View commit details
    Browse the repository at this point in the history
  98. Update packages/babel-parser/src/plugins/estree.js

    Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
    tolmasky and nicolo-ribaudo committed Mar 7, 2022
    Copy the full SHA
    f628099 View commit details
    Browse the repository at this point in the history
  99. Update packages/babel-parser/src/plugins/typescript/index.js

    Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
    tolmasky and nicolo-ribaudo committed Mar 7, 2022
    Copy the full SHA
    38340d4 View commit details
    Browse the repository at this point in the history
  100. Update packages/babel-parser/src/plugins/typescript/index.js

    Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
    tolmasky and nicolo-ribaudo committed Mar 7, 2022
    Copy the full SHA
    192cc85 View commit details
    Browse the repository at this point in the history
  101. Clarify const enum initialization comment.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    a1da9a6 View commit details
    Browse the repository at this point in the history
  102. Fix Flow being angry because __proto__: null makes it think that the …

    …return type can be null.
    
    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    c5f96fd View commit details
    Browse the repository at this point in the history
  103. Copy the full SHA
    06a3459 View commit details
    Browse the repository at this point in the history
  104. Fix duplicated export error.

    Reviewed by @tolmasky.
    tolmasky committed Mar 7, 2022
    Copy the full SHA
    12faef0 View commit details
    Browse the repository at this point in the history