-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ink Compiler
- Loading branch information
Showing
193 changed files
with
14,876 additions
and
1,897 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
/engine/ | ||
/compiler/ | ||
dist/ | ||
test/stories/ | ||
/tests/specs/ | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Differences with the C# Compiler | ||
|
||
## Handling `INCLUDE`s | ||
|
||
The C# compiler is intented to always be used on a file system and thus the question of how files are included follow a classic pattern. | ||
Nevertheless, when using the compiler inside a browser, the concept of "file" is a blurry one. | ||
Inkjs provides 2 file handlers : | ||
* A POSIX file handler : similar to the one used in the C# compiler that will look for files in folders | ||
* A JSON file handler : expects a JSON object of the form | ||
``` | ||
{ | ||
"filename1.ink": "INCLUDE filename2.ink", | ||
"filename2.ink": "This content is included", | ||
} | ||
``` | ||
|
||
## Float and ints | ||
|
||
As the JSON format and javascript in general do not differentiate between float and integers, the inkjs runtime is known to behave differently from the C# runtime when dealing with floating point operations. | ||
|
||
The Ink language parser nevertheless enforces this typing and, when played directly from the output of the compiler (as opposed to exporting to JSON and then loading it), the Story object will actually behave like in the C# Runtime. | ||
|
||
This may lead to slight differences during play. | ||
This [issue is known](https://github.com/y-lohse/inkjs/issues/934) and will be addressed in subsequent release. | ||
|
||
## Named classes/types | ||
|
||
As a major difference from the C# compiler, the Parsed Hierarchy classes are not publicly exposed and their name may be obscured when using the minified version of inkjs-full. | ||
You'll have to rely on their `.typeName` property. | ||
|
||
Some typename are specific to this library : | ||
* Constant declaration : `CONST` instead of `Constant` | ||
* List declaration : `LIST` instead of `VAR` | ||
* List definition (container) : `ListDefinition` instead of `List definition` |
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.