Skip to content

Commit

Permalink
Fix version numbers
Browse files Browse the repository at this point in the history
Summary: Due to a rebase conflict I messed up version numbers in D59322897

Reviewed By: malanka

Differential Revision: D59523124

fbshipit-source-id: ce6c00714cef27c5f1528e9de3a2078339f8b4ac
  • Loading branch information
Simon Marlow authored and facebook-github-bot committed Jul 9, 2024
1 parent b11c19e commit a173ad0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
10 changes: 5 additions & 5 deletions glean/hs/Glean/Angle/Lexer.x
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ tokens :-
"nat" { basicToken T_Nat }
"predicate" { basicToken T_Predicate }
"schema" { basicToken T_Schema }
"set" { versionDependentToken (AngleVersion 9) T_Set (T_Ident . ByteString.toStrict) }
"set" { versionDependentToken (AngleVersion 8) T_Set (T_Ident . ByteString.toStrict) }
"elements" { versionDependentToken (AngleVersion 8) T_Elements (T_Ident . ByteString.toStrict) }
"all" { versionDependentToken (AngleVersion 9) T_All (T_Ident . ByteString.toStrict) }
"all" { versionDependentToken (AngleVersion 8) T_All (T_Ident . ByteString.toStrict) }
"string" { basicToken T_String }
"type" { basicToken T_Type }
"stored" { basicToken T_Stored }
Expand Down Expand Up @@ -113,10 +113,10 @@ tokens :-
"_" { basicToken T_Underscore }
"$" { basicToken T_Dollar }

-- dot-syntax was introduced in version 8
"." @lident / { ifVersion 8 }
-- dot-syntax was introduced in version 9
"." @lident / { ifVersion 9 }
{ tokenContent $ T_Select . ByteString.toStrict . ByteString.tail }
"." @lident "?" / { ifVersion 8 }
"." @lident "?" / { ifVersion 9 }
{ tokenContent $ T_SelectAlt . ByteString.toStrict .
ByteString.tail . ByteString.init }

Expand Down
7 changes: 6 additions & 1 deletion glean/hs/Glean/Angle/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -622,11 +622,16 @@ newtype AngleVersion = AngleVersion Int
deriving (Eq, Ord)
deriving newtype (Pretty)

-- version 8:
-- - added set constructs
-- version 9:
-- - added dot syntax

latestSupportedAngleVersion :: AngleVersion
latestSupportedAngleVersion = AngleVersion 5

latestAngleVersion :: AngleVersion
latestAngleVersion = AngleVersion 8
latestAngleVersion = AngleVersion 9

-- -----------------------------------------------------------------------------
-- Pretty-printing
Expand Down

0 comments on commit a173ad0

Please sign in to comment.