-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support query parameters in generated code
- Loading branch information
Showing
11 changed files
with
275 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
modules/lily-compiler/src/main/java/io/github/tomboyo/lily/compiler/ast/AstEncoding.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package io.github.tomboyo.lily.compiler.ast; | ||
|
||
/** The string expansion strategy for a parameter. */ | ||
public record AstEncoding(Style style, boolean explode) { | ||
public enum Style { | ||
SIMPLE, | ||
FORM, | ||
UNSUPPORTED | ||
} | ||
|
||
public static AstEncoding simple() { | ||
return new AstEncoding(Style.SIMPLE, false); | ||
} | ||
|
||
public static AstEncoding simpleExplode() { | ||
return new AstEncoding(Style.SIMPLE, true); | ||
} | ||
|
||
public static AstEncoding form() { | ||
return new AstEncoding(Style.FORM, false); | ||
} | ||
|
||
public static AstEncoding formExplode() { | ||
return new AstEncoding(Style.FORM, true); | ||
} | ||
|
||
public static AstEncoding unsupported() { | ||
return new AstEncoding(Style.UNSUPPORTED, false); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.