Scalameta Versions Save

Library to read, analyze, transform and generate Scala programs

v4.9.3

1 month ago

Bug fixes

  • ScannerTokens: keep multiple outdents to swap , (#3666) @kitbellew
  • contrib/DocToken: fix the label of a tag (#3663) @kitbellew
  • LegacyTokenData: relax float check, round up max (#3655) @kitbellew
  • InternalTrees: don't keep token cache per tree (#3652) @kitbellew

Miscellaneous

  • TokenStructure: print only variable payload (#3671) @kitbellew
  • Token: make name public (#3670) @kitbellew
  • Token: add len, override it/isEmpty for fixed (#3669) @kitbellew
  • Chars: move escape() from TokenNamerMacros (#3668) @kitbellew
  • Tests: use assertEquals, not assert(x == y) (#3667) @kitbellew
  • Replace scalafiddle reference with scastie (#3665) @sake92
  • Tests: fix #3655 after change in #3660 (#3662) @kitbellew
  • ScalametaParser: quote tokens in syntax error (#3660) @kitbellew
  • token: improve computation of token name (#3659) @kitbellew
  • token: override definition of text() for fixed (#3658) @kitbellew
  • token: remove unused reflect trees (#3657) @kitbellew
  • InternalTrees: text/tokens lazy only if non-parsed (#3656) @kitbellew
  • Origin: add {text,tokens}Opt methods (#3653) @kitbellew

v4.9.2

1 month ago

Features

  • parse literals with unary operands as interpreted values, with unary pre-applied
    • ScalametaParser: parse numbers with unary applied (#3618) @kitbellew
    • Scalameta: undo #3623, semantic and not syntactic (#3630) @kitbellew
    • ScalametaParser: split numericLiteral from literal (#3629) @kitbellew
    • ScalametaParser: fail if literal looks like apply (#3623) @kitbellew
    • ScalametaParser: special float handler, like ints (#3620) @kitbellew
    • Token: KwTrue/KwFalse extends Constant[Boolean] (#3621) @kitbellew
    • ScalametaParser.simpleExpr: don't catch in "rest" (#3622) @kitbellew
    • {Lit,TreeSyntax}Suite: more literal constant tests (#3619) @kitbellew
  • Support quoted type variables in Dialect and ScalametaParser (#3614) @kitbellew
  • Dialects: add scala34 dialect (#3612) @kitbellew

Bug fixes

  • check if syntax-like identifiers are backquoted
    • ScalametaParser: check $ not backquoted in macro (#3648) @kitbellew
    • Keywords: define generic matcher replacing Ident (#3641) @kitbellew
    • TreeSyntax: add methods to print a name backquoted (#3647) @kitbellew
    • MacroSuite: split as separate tests, use shortcuts (#3646) @kitbellew
    • Keywords: match star identifier (#3645) @kitbellew
    • Keywords: match allowQuestionMarkAsTypeWildcard (#3639) @kitbellew
    • ScalametaParser: refactor importWildcardOrName (#3644) @kitbellew
    • ScalametaParser: refactor pattern3 (#3643) @kitbellew
    • ScalametaParser: use token type match, not unapply (#3642) @kitbellew
    • Keywords: match for allowPostfixStarVarargSplices (#3640) @kitbellew
    • Keywords: match for pattern alternatives, or not (#3638) @kitbellew
    • Keywords: match for allowStarAsTypePlaceholder (#3637) @kitbellew
    • ScalametaParser: define VarArgTypeParam matcher (#3636) @kitbellew
    • Keywords: extract common base for all SoftKeywords (#3635) @kitbellew
    • TreeSyntax: isEscapableSoftKeyword as map of Class (#3633) @kitbellew
    • ScalametaParser: add extra expect[] methods (#3634) @kitbellew
    • Add tests with syntax-like backquoted identifiers (#3632) @kitbellew
    • Test backquoted "leading infix" lookalike (#3624) @kitbellew
  • ScannerTokens: add RegionLine if indented further (#3628) @kitbellew
  • ScannerTokens: yet another leading infix fix (#3606) @kitbellew
    • ScannerTokens: symbolic infix check to common (#3608) @kitbellew
    • Chars: move from tokenizers to common (#3609) @kitbellew

Miscellaneous

  • Mima: allow primary Dialect.this constructor (#3616) @kitbellew
  • Mima: slightly refactor determining accessibility (#3615) @kitbellew
  • Trees: define Stat.TypeDef for {Decl,Defn}.Type (#3613) @kitbellew
  • LegacyScanner: clarify misleading variable name (#3611) @kitbellew
  • ScalametaParser: improve selector parsing (#3607) @kitbellew
  • doc: quasiquote now preserve comments (#3572) @unarist

Build updates

  • Update scalafmt-core to 3.8.0 (#3627) @scalameta-bot
  • Update sbt, scripted-plugin to 1.9.9 (#3626) @scalameta-bot
  • Update coursier to 2.1.9 (#3625) @scalameta-bot

v4.9.1

1 month ago

Dependency updates

  • Bump release-drafter/release-drafter from 5 to 6 (#3604) @dependabot

v4.9.1-RC1

1 month ago

Bug fixes

  • Improve parsing of numeric literals
    • LegacyScanner: allow repeated number separators (#3603) @kitbellew
    • Lit.{Int,Long}: handle 0b exactly like 0x (#3601) @kitbellew
    • LegacyScanner: remove duplicate float parse logic (#3602) @kitbellew
    • LegacyTokenData: use BigInt string parser (#3600) @kitbellew
    • Lit.{Float,Double}: build directly from BigDecimal (#3599) @kitbellew
    • LegacyScanner: skip numeric prefixes and suffixes (#3598) @kitbellew
    • Lit.{Float,Double}: disallow NaN and Infinity (#3596) @kitbellew
    • LegacyScanner: more explicitly check for octal (#3595) @kitbellew
    • LegacyScanner: refactor number parsing (#3592) @kitbellew
    • LegacyScanner: clarify error message and position (#3593) @kitbellew
    • LegacyScanner: remove unused float parsing logic (#3591) @kitbellew
    • TokenizerSuite: add more numeric literal tests (#3590) @kitbellew
    • LegacyScanner: skip numeric separators early (#3588) @kitbellew
    • LegacyScanner: fix numeric separator error offset (#3587) @kitbellew
    • TokenizerSuite: detailed numeric separator checks (#3586) @kitbellew
    • Add more tests with numeric literals (#3585) @kitbellew
  • ScannerTokens: improve handling within case body (#3584) @kitbellew
  • ScalametaParser: capture fewer-braces as a block (#3581) @kitbellew
  • ScalametaParser: in fewer braces, limit type parse (#3582) @kitbellew
  • Fix invalid pattern: quasiquote handling of Apply (#3580) @kitbellew
  • Fix invalid check: empty or nested Member.Tuple (#3579) @kitbellew
  • bugfix: Don't release Native nad Js when releasing semanticdb (#3577) @tgodzik
  • ScannerTokens: improve leading infix detection (#3575) @kitbellew
  • Exceptions: improve formatting of debuggees (#3569) @kitbellew

Miscellaneous

  • TokenStructure: include token class name (#3589) @kitbellew
  • Fix merge of #3581 and #3582 (#3583) @kitbellew
  • chore: Add support for Scala 2.13.13 (#3566) @tgodzik
  • chore: Add support for Scala 2.12.19 (#3574) @tgodzik
  • org.scalameta: extract classes from package object (#3568) @kitbellew
  • InvariantSuite: use interceptMessage (#3567) @kitbellew

Dependency updates

  • Update nscplugin, sbt-scala-native, ... to 0.4.17 (#3540) @scalameta-bot

v4.9.0

2 months ago

Features

  • add binary literals support (#3543) @kasiaMarek
  • preserve origin and dialect in quasiquotes
    • ast: implicit dialect in apply(), store in origin (#3503) @kitbellew
    • Dialect: call methods with all arguments named (#3511) @kitbellew
    • Dialect: in privateCopy, don't copy if the same (#3510) @kitbellew
    • Dialect: use unquote dialect in toString() (#3507) @kitbellew
    • Dialect: ignore deprecated and unused fields (#3506) @kitbellew
    • Dialect: split isEquivalentTo (#3509) @kitbellew
    • Dialect: determine unquote parent by unquote type (#3508) @kitbellew
    • InternalTrees: add tokens overload without dialect (#3502) @kitbellew
    • InternalTrees: require origin dialect in tokens (#3498) @kitbellew
    • Tree: remove methods defined in InternalTree (#3501) @kitbellew
    • Tree: fix maybeParsed extension, add ClassTag (#3499) @kitbellew
    • InternalTrees: clean up error message in text (#3497) @kitbellew
    • Tree: add maybeParse extension, for a parsed tree (#3493) @kitbellew
    • InternalTrees: rename dialectText, add tokenizeFor (#3496) @kitbellew
    • InternalTrees: extract tokens caching logic (#3495) @kitbellew
    • InternalTrees: extract getting syntax-based input (#3494) @kitbellew
    • InternalTrees: another extension to set dialect (#3492) @kitbellew
    • InternalTrees: define text and dialectText (#3491) @kitbellew
    • Transverser: set dialect recursively on root tree (#3490) @kitbellew
    • ScalametaParser: keep Lit.{Double,Float} syntax (#3489) @kitbellew
    • TreeStructure: don't use tokens, ignore syntax (#3488) @kitbellew
    • InternalTrees: add extension withOriginRecursive (#3487) @kitbellew
    • ReificationMacros: cosmetic, get position once (#3486) @kitbellew
    • ReificationMacros: build three lists in one pass (#3485) @kitbellew
    • Trees: save tokens and positions as lazy (#3484) @kitbellew
    • Tree: remove privateOrigin, ensure origin is valid (#3481) @kitbellew
    • Origin: add a DialectOnly version (#3480) @kitbellew
    • ReificationMacros: fix handling of embedded $ (#3479) @kitbellew
    • Dialect: replace unquote flags with a single one (#3478) @kitbellew
    • Dialect: keep original, pre-quasiquote dialect (#3472) @kitbellew
    • ast: save origin as a private field, add apply() (#3457) @kitbellew
    • Tree: expose dialect if available (#3477) @kitbellew
    • Origin: move out of internal (#3454) @kitbellew
    • Tokens: use Token.text, not .toString (#3473) @kitbellew
    • TreeToString: use a more recent default dialect (#3470) @kitbellew
    • ReificationMacros: construct sourceName if needed (#3467) @kitbellew
    • Dialect: add private methods to enable unquoting (#3459) @kitbellew
    • TokenStreamPosition: move inline in Origin.Parsed (#3456) @kitbellew
    • adt.Liftables: include private fields if requested (#3452) @kitbellew
    • SuccessSuite: test origin of interp quasiquotes (#3455) @kitbellew
    • adt.Reflection: refactor prefix generation (#3447) @kitbellew
    • Sort imports if using Origin/TokenStreamPosition (#3453) @kitbellew
    • adt.Liftables: obtain latest version only for ast (#3451) @kitbellew
    • ReificationMacros: lift origin, dialect and input (#3450) @kitbellew
    • adt.Reflection: allow private fields (#3449) @kitbellew
    • adt.Reflection: no isPayload/isAuxiliary methods (#3448) @kitbellew
    • ReificationMacros: refactor instantiating dialect (#3446) @kitbellew
    • Origin: extract input/dialect into separate class (#3445) @kitbellew
    • Origin: add position method (#3444) @kitbellew
    • ast: define private fields with initial values (#3443) @kitbellew
    • ReificationMacros: simplify metaInput (#3434) @kitbellew
    • ReificationMacros: extract methods creating holes (#3437) @kitbellew
    • adt.Reflection: retrieve fields in sorted order (#3438) @kitbellew
    • adt.Reflection: refactor isField extension (#3439) @kitbellew
    • ast: exclude the final apply call from apply body (#3441) @kitbellew
    • InternalTree: clean up handling of origin (#3428) @kitbellew
    • Dialect: improve isEquivalentTo (#3430) @kitbellew
    • adt.Reflection: remove unnecessary methods (#3429) @kitbellew
    • Add a quasiquotes test showing origin is missing (#3427) @kitbellew
    • ast: remove intermediate variable in method return (#3433) @kitbellew
    • ReificationMacros: save Hole.isTerm as val (#3435) @kitbellew
    • ReificationMacros: don't import definitions._ (#3436) @kitbellew
    • ast: move private fields to before other fields (#3442) @kitbellew
    • ast: define annotation for astField as val (#3440) @kitbellew
    • ast: extract getDeferredModifiers method (#3432) @kitbellew
    • ReificationMacros: move extensions to class level (#3431) @kitbellew

Bug fixes

  • remove unused-variable warning
    • ReificationMacros: dialect is implicit, use that (#3553) @kitbellew
    • ReificationMacros: no dialectOnly if use source (#3551) @kitbellew
  • ScannerTokens: improve handling of finally (#3536) @kitbellew
  • ScannerTokens: move comma past outdents in parens (#3542) @kitbellew
  • ScalametaParser: parse coloneol arg as lambda (#3537) @kitbellew
    • ScalametaParser: allow func params in arg clause (#3516) @kitbellew
    • ScalametaParser: parse colon-space arg as lambda (#3529) @kitbellew
    • FewerBracesSuite: add cases without params (#3533) @kitbellew
    • FewerBracesSuite: also add tests with using (#3528) @kitbellew
    • ScalametaParser: add getFewerBracesApplyOnColon (#3520) @kitbellew
    • ScalametaParser: keep block around func with mods (#3515) @kitbellew
    • FewerBracesSuite: tests with erased (#3513) @kitbellew
  • ScalametaParser: allow lazy with given (#3534) @kitbellew
  • TreeSyntax: fix bug in interpolate syntax (#3465) @kitbellew
  • bugfix: Shade sourcecode as it's a dependency of fastparse (#3468) @tgodzik
  • Fix typo in error message (#3424) @lolgab

Build improvements

  • fix all warnings except deprecations
    • SBT: fail build on warnings, treat some as info (#3561) @kitbellew
    • Transversers: skip Quasi before other trees (#3562) @kitbellew
    • Warnings: fix match may not be exhaustive (#3565) @kitbellew
    • Warnings: remove unused imports (#3560) @kitbellew
    • Warnings: replace deprecated JavaConverters (#3554) @kitbellew
    • Warnings: replace deprecated 'xyz symbols (#3557) @kitbellew
    • Warnings: replace deprecated scala.compat.Platform (#3555) @kitbellew
    • Warnings: avoid deprecated scalameta Tree methods (#3559) @kitbellew
    • Warnings: avoid deprecated ext library methods (#3558) @kitbellew
    • Warnings: add () to non-parameterless methods (#3556) @kitbellew
  • Github workflow: rename website release job (#3514) @kitbellew
  • SBT: remove circular dependency with mdoc (#3500) @kitbellew
  • SBT: undo shading of the sourcecode dependency (#3483) @kitbellew
  • SBT: add shading to the common package (#3482) @kitbellew
  • refactor: Fix some of the remaining warnings and errors for Scala 3 (#3423) @tgodzik

Miscellaneous

  • Transversers: use foreach instead hasNext/next (#3563) @kitbellew
  • Transversers: inline some of method invocations (#3564) @kitbellew
  • ScannerTokens: improve generating outdents (#3550) @kitbellew
  • ScannerTokens: move mkOutdents into mkOutdentsOpt (#3548) @kitbellew
  • ScannerTokens: verify array index is non-negative (#3547) @kitbellew
  • TreeSyntax: omit () around partial function (#3545) @kitbellew
  • Use shortcut methods in tests (#3535) @kitbellew
  • ScalametaParser: no anonymous func around postfix (#3527) @kitbellew
  • ScalametaParser: add acceptAfterOpt method (#3524) @kitbellew
  • ScalametaParser: make blockExprPartial specific (#3526) @kitbellew
  • ScannerTokens: add isExprIntro overload (#3525) @kitbellew
  • ScalametaParser: remove block around apply {} (#3517) @kitbellew
  • ScalametaParser: in implicitClosure, no full type (#3523) @kitbellew
  • ScalametaParser: split getArgClause into two (#3522) @kitbellew
  • ScalametaParser: add method to read declared type (#3521) @kitbellew
  • ScalametaParser: return in ellipsis precise type (#3519) @kitbellew
  • ScalametaParser: add fullTypeOK to Location (#3518) @kitbellew
  • TermSuite: use shortcut methods (#3512) @kitbellew
  • Add section in contributors guide for native dependencies. (#3505) @yilinwei
  • DialectSuite: add more tests, including toString (#3504) @kitbellew
  • ast: do not remove type and definition annotations (#3476) @kitbellew
  • Token: dialect consistency check from TokenSyntax (#3474) @kitbellew
  • Enquote: slightly generalize the code (#3469) @kitbellew
  • Invariants: provide human-readable clue of failure (#3475) @kitbellew
  • SuccessSuite: add tests verifying type annotation (#3471) @kitbellew
  • Add common base for {Parse,Tokenize}Exception (#3461) @kitbellew
  • ParseSuite: improve assertLines, runTestAssert (#3462) @kitbellew
  • Add more detailed test syntax comparisons (#3458) @kitbellew
  • ModSuite: no implicit ParamClauseGroup conversion (#3426) @kitbellew

Dependency updates

  • Update sbt-protoc to 1.0.7 (#3538) @scalameta-bot
  • Update mdoc, sbt-mdoc to 2.5.2 (#3541) @scalameta-bot
  • Update compilerplugin, protoc-gen-scala, ... to 0.11.15 (#3539) @scalameta-bot
  • Update sbt-jmh to 0.4.7 (#3464) @scalameta-bot
  • Update sbt, scripted-plugin to 1.9.8 (#3463) @scalameta-bot

v4.8.15

3 months ago

Fix leading-infix handling

  • ScannerTokens: introduce a line-indent region (#3422) @kitbellew
  • ScannerTokens: improve getIfCanProduceLF (#3416) @kitbellew
  • ScannerTokens: improve obtaining lastNewlinePos (#3419) @kitbellew
  • ScannerTokens: make isLeadingInfix compliant (#3411) @kitbellew
  • ScannerTokens: minor refactor with ws scanning (#3421) @kitbellew
  • ScalametaParser: minor refactor with infix parsing (#3420) @kitbellew
  • ScannerTokens: explicitly handle null next (#3417) @kitbellew
  • ScannerTokens: compute nextIndent once (#3418) @kitbellew
  • FewerBracesSuite: use tname instead of Term.Name (#3415) @kitbellew
  • Use EOL/AtEOL instead of LF or LFLF in matching (#3414) @kitbellew
  • ScannerTokens: use rs for matched regions (#3410) @kitbellew
  • ScannerTokens: reimplement multilineCommentIndent (#3405) @kitbellew
  • TokenIterator: replace {current,peek}Indentation (#3406) @kitbellew
  • ScannerTokens: use original regions, not matched (#3408) @kitbellew
  • ScalametaParser: in refinementInBraces, simplify (#3407) @kitbellew

Bug fixes

  • fix: don't emit implicit conversion occurrence when qualifier in synthetic apply (#3412) @kasiaMarek
  • CharArrayReader: allow high-surrogate in squotes (#3404) @kitbellew
  • CharArrayReader: move readUnicodeChar to companion (#3403) @kitbellew

Dependency updates

  • Update mdoc, sbt-mdoc to 2.5.1 (#3400) @scalameta-bot
  • Update coursier to 2.1.8 (#3399) @scalameta-bot
  • Update scalafmt-core to 3.7.17 (#3401) @scalameta-bot
  • Update sbt-npm-package to 0.2.0 (#3398) @scalameta-bot
  • Update sbt-assembly to 2.1.5 (#3397) @scalameta-bot
  • build(deps): bump actions/setup-java from 3 to 4 (#3396) @dependabot

v4.8.14

5 months ago

Bug fixes

  • Scaladoc: fix syntax of EnclosedJavaTag (#3393) @kitbellew
  • ScannerTokens: fix leading infix with fewer braces (#3391) @kitbellew

v4.8.13

5 months ago

Bug fixes

  • PlaceholderChecks: don't access field if Quasi (#3389) @kitbellew
  • javacp: fix regressions with JDK21 & improve handling of inner classes (#3386) @bjaglin
  • Fix FuncParamClause not adding parentheses for Type.Function (#3373) @hugo-vrijswijk
  • avoid deprecated java.net.URL constructor (#3371) @xuwei-k

Miscellaneous

  • refactor: Don't use pattern match on val in TokenSuite (#3375) @tgodzik
  • refactor: Use Ctor.Primary primary apply by default (#3374) @tgodzik

Dependency updates

  • Update mdoc, sbt-mdoc to 2.3.8 (#3383) @scalameta-bot
  • Update nscplugin, sbt-scala-native, ... to 0.4.16 (#3381) @scalameta-bot
  • Update sbt-assembly to 2.1.4 (#3379) @scalameta-bot
  • Update sbt, scripted-plugin to 1.9.7 (#3382) @scalameta-bot
  • Update scalafmt-core to 3.7.15 (#3384) @scalameta-bot
  • build(deps): bump actions/setup-node from 3 to 4 (#3378) @dependabot

v4.8.12

6 months ago

Pull Requests

  • refactor: Drop using of pattern match in vals for most cases (#3369) @tgodzik
  • improvement: Get rid of more pattern matches in vals (#3368) @tgodzik
  • improvement: Don't pattern match in tests in vals (#3365) @tgodzik
  • ScannerTokens: end marker must be preceded by NL (#3367) @kitbellew
  • improvement: Make contrib.ScaladocParser compile with Scala 3 (#3364) @tgodzik
  • improvement: Explicitely use empty Term.ArgClause (#3363) @tgodzik
  • AstInfo: define implicit explicitly for each tree (#3362) @kitbellew
  • AstInfo: remove ClassTag derivation (#3361) @kitbellew
  • improvement: Try and remove more macros from parsers (#3359) @tgodzik
  • improvement: Remove macro usage from Scalameta parser (#3358) @tgodzik
  • ScalametaParser: fix warnings, inherited vs outer (#3356) @kitbellew
  • SBT: set shaded dependency properties centrally (#3357) @kitbellew
  • bugfix: Also ignore shading rules for Scala 2.11.12 (#3346) @tgodzik
  • Update nscplugin, sbt-scala-native, ... to 0.4.15 (#3352) @scalameta-bot
  • Update sbt-jmh to 0.4.6 (#3355) @scalameta-bot
  • Update scalafmt-core to 3.7.14 (#3354) @scalameta-bot
  • Update sbt, scripted-plugin to 1.9.6 (#3353) @scalameta-bot
  • Update coursier to 2.1.7 (#3351) @scalameta-bot
  • Update sourcecode to 0.3.1 (#3350) @scalameta-bot
  • Update sbt-assembly to 2.1.3 (#3349) @scalameta-bot
  • Bump actions/checkout from 3 to 4 (#3348) @dependabot

v4.8.11

7 months ago

Features

  • ScaladocParser: add EnclosedJavaTag as a text part (#3342) @kitbellew

Bug fixes

  • Support unicode surrogate pairs
    • tokenizers.CharArrayReader: allow surrogate pairs (#3345) @kitbellew
    • tokenizers.CharArrayReader: read a char at offset (#3344) @kitbellew
    • tokenizers.CharArrayReader: replace charOffset with range (#3339) @kitbellew
    • Add test with a unicode surrogate pair (#3340) @kitbellew
    • tokenizers.LegacyScanner: clean up (#3332) @kitbellew
    • tokenizers.Chars: check using int codepoints (#3337) @kitbellew
    • tokenizers.CharArrayReader: inline unicode CRLF (#3336) @kitbellew
    • tokenizers.CharArrayReader: re-use nextRawChar (#3333) @kitbellew
    • tokenizers.LegacyScanner: look ahead only if need (#3334) @kitbellew
    • tokenizers.LegacyScanner: use lang.StringBuilder (#3330) @kitbellew
    • tokenizers.Chars: remove unused methods (#3331) @kitbellew
    • TokenizerSuite: refactor, add convenience methods (#3335) @kitbellew
  • bugfix: support carriage return (#3343) @kasiaMarek

Dependency updates

  • sbt-shading: use the released 2.1.3 version (#3341) @kitbellew
  • chore: Add support for Scala 2.13.12 (#3323) @tgodzik
  • Update scalafmt-core to 3.7.13 (#3327) @scalameta-bot
  • Update sbt, scripted-plugin to 1.9.4 (#3326) @scalameta-bot
  • Update coursier to 2.1.6 (#3325) @scalameta-bot