initial commit
This commit is contained in:
commit
066c828f47
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
bin/
|
||||
obj/
|
||||
.ionide/
|
2
Program.fs
Normal file
2
Program.fs
Normal file
@ -0,0 +1,2 @@
|
||||
// For more information see https://aka.ms/fsharp-console-apps
|
||||
printfn "Hello from F#"
|
47
Syntax.fs
Normal file
47
Syntax.fs
Normal file
@ -0,0 +1,47 @@
|
||||
module VijiN.Syntax
|
||||
|
||||
type Variable = Variable of string
|
||||
|
||||
type Term = Text of string | Variable of Variable
|
||||
|
||||
type Character = Character of Term
|
||||
// TODO: Character should probably have more, like selecting portrait outfit/style
|
||||
|
||||
type DirectivePrefix = Prefix of string
|
||||
type DirectiveInfix = Infix of string
|
||||
type DirectiveSuffix = Suffix of string
|
||||
type DirectiveOperator = DirectivePrefix * DirectiveInfix option * DirectiveSuffix option
|
||||
|
||||
type DirectiveArg = Arg of Term
|
||||
type Directive = DirectiveOperator * DirectiveArg list list // TODO: non-empty list
|
||||
type Directives = Directive list // TODO: non-empty list
|
||||
|
||||
type ChoiceText = Text of Term
|
||||
type ChoiceValue = Value of Term
|
||||
type ChoiceOption = ChoiceText * ChoiceValue option
|
||||
type Choice = Variable * ChoiceOption list // TODO: non-empty list
|
||||
|
||||
type InlineDirective = Directive
|
||||
type SpokenText =
|
||||
| Plain of Term
|
||||
| Emphasis of Term
|
||||
| Yell of Term
|
||||
| Whisper of Term
|
||||
type Spoken = Character option * InlineDirective list * SpokenText list // TODO: non-empty list
|
||||
|
||||
type Comment = Comment of string
|
||||
|
||||
type Line =
|
||||
| Spoken of Spoken
|
||||
| Directive of Directives
|
||||
| Comment of Comment
|
||||
| Choice of Choice
|
||||
|
||||
type LineNumber = Line of int // TODO: >= 1
|
||||
type PageNumber = Page of int // TODO: >= 1
|
||||
type ScriptLine = LineNumber * PageNumber * Line
|
||||
// TODO: other diffing metadata
|
||||
|
||||
type SceneName = Name of string
|
||||
|
||||
type Scene = SceneName * Character list * ScriptLine list
|
10
vijin.fsproj
Normal file
10
vijin.fsproj
Normal file
@ -0,0 +1,10 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Syntax.fs" />
|
||||
<Compile Include="Program.fs" />
|
||||
</ItemGroup>
|
||||
</Project>
|
Loading…
Reference in New Issue
Block a user