├── .dockerignore ├── src ├── util │ ├── js │ │ ├── LockFile.js │ │ ├── SecureRandomPeer.js │ │ ├── SeededRandomPeer.js │ │ ├── IntArray.js │ │ ├── BoolArray.js │ │ └── FloatArray.js │ └── es │ │ ├── SecureRandomPeer.js │ │ ├── SeededRandomPeer.js │ │ └── BoolArray.js ├── testNative │ ├── res │ │ └── foo.txt │ ├── java │ │ └── Foo.java │ └── fan │ │ └── NativeClass.fan ├── testSys │ ├── res │ │ ├── podtest.props │ │ └── test.txt │ ├── locale │ │ ├── es-MX.props │ │ ├── en-US.props │ │ ├── es.props │ │ └── en.props │ ├── concurrent │ │ └── locale │ │ │ └── fr.props │ └── fan │ │ └── Facets.fan ├── .dockerignore ├── sys │ ├── locale │ │ ├── en-AU.props │ │ ├── en-IE.props │ │ ├── en-NZ.props │ │ ├── en-GB.props │ │ ├── en-US.props │ │ ├── zh.props │ │ ├── ja.props │ │ ├── pa.props │ │ ├── kn.props │ │ ├── ku.props │ │ ├── tl.props │ │ ├── ko.props │ │ ├── gu.props │ │ ├── ar.props │ │ ├── lo.props │ │ ├── he.props │ │ ├── mg.props │ │ ├── nn.props │ │ ├── sr.props │ │ ├── mr.props │ │ ├── sd.props │ │ ├── ur.props │ │ ├── ms.props │ │ ├── tg.props │ │ ├── kk.props │ │ ├── th.props │ │ ├── ta.props │ │ ├── uz.props │ │ ├── km.props │ │ ├── es.props │ │ ├── fa.props │ │ ├── om.props │ │ ├── hi.props │ │ ├── ne.props │ │ ├── pt.props │ │ ├── sl.props │ │ ├── ml.props │ │ ├── hr.props │ │ ├── id.props │ │ ├── cs.props │ │ ├── it.props │ │ ├── tr.props │ │ ├── bg.props │ │ ├── da.props │ │ ├── de.props │ │ ├── mn.props │ │ ├── pl.props │ │ ├── sk.props │ │ ├── sv.props │ │ ├── ro.props │ │ ├── nb.props │ │ ├── uk.props │ │ ├── fr.props │ │ ├── hu.props │ │ ├── ru.props │ │ ├── te.props │ │ └── bn.props │ ├── dotnet │ │ ├── fan │ │ │ └── sys │ │ │ │ ├── Facet.cs │ │ │ │ ├── Void.cs │ │ │ │ ├── This.cs │ │ │ │ ├── Js.cs │ │ │ │ ├── Number.cs │ │ │ │ ├── NoDoc.cs │ │ │ │ ├── Operator.cs │ │ │ │ ├── Transient.cs │ │ │ │ ├── Service.cs │ │ │ │ ├── Unsafe.cs │ │ │ │ ├── FacetMeta.cs │ │ │ │ └── Deprecated.cs │ │ └── fanx │ │ │ ├── serial │ │ │ └── Literal.cs │ │ │ ├── fcode │ │ │ ├── FDoc.cs │ │ │ ├── FField.cs │ │ │ └── FSlot.cs │ │ │ └── tools │ │ │ └── Fanp.cs │ ├── js │ │ └── fan │ │ │ ├── Void.js │ │ │ ├── Zip.js │ │ │ ├── This.js │ │ │ ├── Service.js │ │ │ ├── LocalFileStore.js │ │ │ └── Endian.js │ ├── java │ │ ├── fan │ │ │ └── sys │ │ │ │ ├── Facet.java │ │ │ │ ├── Void.java │ │ │ │ ├── This.java │ │ │ │ ├── NoDoc.java │ │ │ │ ├── Js.java │ │ │ │ ├── Operator.java │ │ │ │ ├── Transient.java │ │ │ │ ├── FileStore.java │ │ │ │ ├── Unsafe.java │ │ │ │ ├── FacetMeta.java │ │ │ │ └── Deprecated.java │ │ ├── fanx │ │ │ ├── test │ │ │ │ ├── TestAnnoA.java │ │ │ │ └── TestAnnoB.java │ │ │ ├── serial │ │ │ │ └── Literal.java │ │ │ ├── interop │ │ │ │ ├── IntArray.java │ │ │ │ ├── ByteArray.java │ │ │ │ ├── CharArray.java │ │ │ │ ├── LongArray.java │ │ │ │ ├── FloatArray.java │ │ │ │ ├── ShortArray.java │ │ │ │ ├── DoubleArray.java │ │ │ │ └── BooleanArray.java │ │ │ └── fcode │ │ │ │ ├── FField.java │ │ │ │ └── FSlot.java │ │ └── build.fan │ ├── fan │ │ ├── Facet.fan │ │ ├── Endian.fan │ │ ├── Void.fan │ │ ├── LogLevel.fan │ │ ├── This.fan │ │ ├── ArgErr.fan │ │ ├── Unsafe.fan │ │ ├── CastErr.fan │ │ ├── IndexErr.fan │ │ ├── UnsupportedErr.fan │ │ ├── UnknownPodErr.fan │ │ ├── UnknownKeyErr.fan │ │ ├── UnknownSlotErr.fan │ │ ├── UnknownTypeErr.fan │ │ ├── UnresolvedErr.fan │ │ ├── IOErr.fan │ │ ├── TimeoutErr.fan │ │ ├── ConstErr.fan │ │ ├── InterruptedErr.fan │ │ ├── NameErr.fan │ │ ├── CancelledErr.fan │ │ ├── FieldNotSetErr.fan │ │ ├── ReadonlyErr.fan │ │ ├── ParseErr.fan │ │ ├── UnknownFacetErr.fan │ │ ├── NotImmutableErr.fan │ │ ├── UnknownServiceErr.fan │ │ └── NullErr.fan │ └── es │ │ └── fan │ │ ├── Service.js │ │ ├── This.js │ │ ├── Process.js │ │ ├── Void.js │ │ ├── Unsafe.js │ │ ├── UriScheme.js │ │ └── FileStore.js ├── testGraphics │ ├── res │ │ ├── test.jpg │ │ ├── test.png │ │ └── test.svg │ └── fan │ │ ├── Main.fan │ │ ├── AbstractTest.fan │ │ └── ColorsTest.fan ├── doc │ ├── docLang │ │ ├── doc │ │ │ └── deployment.png │ │ └── build.fan │ ├── docDomkit │ │ ├── doc │ │ │ ├── Modal-Popup-1.png │ │ │ ├── Control-Button-1.png │ │ │ ├── Control-Combo-1.png │ │ │ ├── Control-Menu-1.png │ │ │ ├── Control-Table-1.png │ │ │ ├── Control-Tree-1.png │ │ │ ├── Layout-CardBox.png │ │ │ ├── Layout-FlowBox-1.png │ │ │ ├── Layout-FlowBox-2.png │ │ │ ├── Layout-FlowBox-3.png │ │ │ ├── Layout-GridBox.png │ │ │ ├── Layout-WellBox-1.png │ │ │ ├── Modal-Dialog-1.png │ │ │ ├── Control-Checkbox-1.png │ │ │ ├── Control-TextArea-1.png │ │ │ ├── Control-ListButton-1.png │ │ │ ├── Control-ListButton-2.png │ │ │ ├── Control-ProgressBar-1.png │ │ │ ├── Control-RadioButton-1.png │ │ │ ├── Control-TextField-1.png │ │ │ ├── Control-ToggleButton-1.png │ │ │ └── index.fog │ │ └── build.fan │ ├── build.fan │ ├── docFanr │ │ ├── doc │ │ │ └── index.fog │ │ └── build.fan │ ├── docTools │ │ ├── build.fan │ │ └── doc │ │ │ └── index.fog │ └── docIntro │ │ ├── build.fan │ │ └── doc │ │ └── index.fog ├── fansc │ ├── FanSc │ │ └── App.config │ └── build.fan ├── domkit │ ├── css │ │ ├── Label.css │ │ ├── CardBox.css │ │ ├── FlowBox.css │ │ ├── ScrollBox.css │ │ ├── ProgressBar.css │ │ ├── AccordianBox.css │ │ ├── TextArea.css │ │ ├── WellBox.css │ │ ├── FlexBox.css │ │ ├── Box.css │ │ ├── SashBox.css │ │ ├── TextField.css │ │ ├── GridBox.css │ │ ├── Button.css │ │ ├── Dnd.css │ │ ├── Sheet.css │ │ ├── Menu.css │ │ ├── Popup.css │ │ ├── Checkbox.css │ │ ├── RadioButton.css │ │ ├── ListButton.css │ │ └── Combo.css │ ├── fan │ │ ├── Dir.fan │ │ ├── Align.fan │ │ ├── Label.fan │ │ ├── Box.fan │ │ ├── ScrollBox.fan │ │ └── Link.fan │ └── pod.fandoc ├── testJava │ ├── fan │ │ ├── JavaImplTest.fan │ │ └── JavaTest.fan │ └── java │ │ └── JavaImplTestPeer.java ├── asn1 │ └── fan │ │ └── AsnErr.fan ├── markdown │ ├── test │ │ ├── DelimiterProcessorTest.fan │ │ └── ThematicBreakParserTest.fan │ └── fan │ │ └── parser │ │ └── block │ │ └── DocumentBlockParser.fan ├── sql │ ├── fan │ │ └── SqlErr.fan │ └── java │ │ └── Cols.java ├── testDomkit │ └── res │ │ ├── info-white.svg │ │ └── info-grey.svg ├── build │ └── fan │ │ ├── BuildLog.fan │ │ ├── FatalBuildErr.fan │ │ ├── Facets.fan │ │ └── tasks │ │ ├── Delete.fan │ │ └── CreateDir.fan ├── concurrent │ ├── es │ │ ├── ActorFuture.js │ │ ├── Lock.js │ │ ├── Actor.js │ │ └── AtomicBoolPeer.js │ ├── js │ │ ├── Lock.js │ │ ├── ActorFuture.js │ │ └── Future.js │ └── fan │ │ └── Errs.fan ├── nodeJs │ ├── res │ │ ├── testRunnerTemplate.js │ │ └── scriptRunnerTemplate.js │ └── fan │ │ └── Main.fan ├── dom │ ├── fan │ │ ├── TextSel.fan │ │ ├── DomImage.fan │ │ └── WeakMap.fan │ ├── es │ │ ├── TextSelPeer.js │ │ ├── WeakMapPeer.js │ │ └── DomImagePeer.js │ ├── js │ │ ├── TextSelPeer.js │ │ └── WeakMapPeer.js │ └── java │ │ ├── HttpReqPeer.java │ │ └── QuerySelector.java ├── inet │ └── fan │ │ └── UnknownHostErr.fan ├── crypto │ └── fan │ │ ├── Csr.fan │ │ └── Jwk.fan ├── graphics │ └── fan │ │ └── Paint.fan ├── compilerJs │ ├── res │ │ └── scriptRunnerTemplate.js │ └── fan │ │ ├── ast │ │ ├── JsFacet.fan │ │ └── JsBlock.fan │ │ └── util │ │ └── JsExtToMime.fan ├── math │ ├── fan │ │ └── Math.fan │ ├── test │ │ └── BigIntTest.fan │ └── pod.fandoc ├── fandoc │ ├── fan │ │ ├── FandocErr.fan │ │ └── DocWriter.fan │ └── build.fan ├── xml │ ├── fan │ │ └── XIncompleteErr.fan │ └── build.fan ├── cryptoJava │ ├── fan │ │ ├── JDigest.fan │ │ └── X509.fan │ └── test │ │ └── DnTest.fan ├── web │ └── test │ │ └── FilePackTest.fan ├── compilerEs │ └── fan │ │ └── util │ │ └── JsExtToMime.fan ├── email │ ├── fan │ │ └── SmtpErr.fan │ └── build.fan ├── compiler │ └── fan │ │ ├── namespace │ │ └── CDepend.fan │ │ └── CompilerErr.fan └── fansh │ └── build.fan ├── bin ├── fansc.exe ├── nstub.exe ├── fan ├── fanr ├── flux ├── jstub ├── fanp ├── fansh ├── fanc ├── fant ├── flux.bat ├── fanc.bat ├── fansh.bat ├── fanr.bat ├── jstub.bat ├── fanp.bat ├── fant.bat ├── fan.bat └── fansubstitute ├── etc ├── sys │ ├── timezones.ftz │ └── log.props ├── sql │ └── config.props ├── syntax │ ├── syntax-batch.fog │ ├── syntax-yaml.fog │ ├── syntax-shell.fog │ ├── syntax-css.fog │ ├── syntax-xeto.fog │ ├── syntax-xml.fog │ └── syntax-axon.fog ├── fanr │ └── config.props └── build │ └── config.props ├── examples ├── java │ └── hello.fan └── web │ ├── demo │ └── index.html │ └── hello.fan ├── adm ├── unixsetup ├── tools │ └── atom │ │ └── install.fan └── filereplace.fan └── .gitignore /.dockerignore: -------------------------------------------------------------------------------- 1 | dockerfile -------------------------------------------------------------------------------- /src/util/js/LockFile.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/testNative/res/foo.txt: -------------------------------------------------------------------------------- 1 | wombat -------------------------------------------------------------------------------- /src/testSys/res/podtest.props: -------------------------------------------------------------------------------- 1 | barney=stinson -------------------------------------------------------------------------------- /src/.dockerignore: -------------------------------------------------------------------------------- 1 | .dockerignore 2 | dockerfile -------------------------------------------------------------------------------- /src/testSys/res/test.txt: -------------------------------------------------------------------------------- 1 | hello world 2 | line 2 -------------------------------------------------------------------------------- /src/testSys/locale/es-MX.props: -------------------------------------------------------------------------------- 1 | // en.props 2 | 3 | a=a es-MX 4 | 5 | -------------------------------------------------------------------------------- /src/testSys/locale/en-US.props: -------------------------------------------------------------------------------- 1 | // en.props 2 | 3 | a=a en-US 4 | 5 | 6 | -------------------------------------------------------------------------------- /bin/fansc.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fantom-lang/fantom/HEAD/bin/fansc.exe -------------------------------------------------------------------------------- /bin/nstub.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fantom-lang/fantom/HEAD/bin/nstub.exe -------------------------------------------------------------------------------- /etc/sys/timezones.ftz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fantom-lang/fantom/HEAD/etc/sys/timezones.ftz -------------------------------------------------------------------------------- /src/testSys/locale/es.props: -------------------------------------------------------------------------------- 1 | // en.props 2 | 3 | a=a es 4 | b=b es 5 | c=c es 6 | e=e es 7 | 8 | -------------------------------------------------------------------------------- /src/sys/locale/en-AU.props: -------------------------------------------------------------------------------- 1 | // 2 | // sys::en-AU.props English Australia 3 | // 4 | 5 | weekdayStart=mon -------------------------------------------------------------------------------- /src/sys/locale/en-IE.props: -------------------------------------------------------------------------------- 1 | // 2 | // sys::en-IE.props English Ireland 3 | // 4 | 5 | weekdayStart=mon -------------------------------------------------------------------------------- /src/testSys/concurrent/locale/fr.props: -------------------------------------------------------------------------------- 1 | // fr.props 2 | 3 | q=q fr 4 | p=p fr 5 | r=r fr 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/sys/locale/en-NZ.props: -------------------------------------------------------------------------------- 1 | // 2 | // sys::en-NZ.props English New Zealand 3 | // 4 | 5 | weekdayStart=mon -------------------------------------------------------------------------------- /src/sys/locale/en-GB.props: -------------------------------------------------------------------------------- 1 | // 2 | // sys::en-GB.props English Great Britain / UK 3 | // 4 | 5 | weekdayStart=mon -------------------------------------------------------------------------------- /src/testGraphics/res/test.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fantom-lang/fantom/HEAD/src/testGraphics/res/test.jpg -------------------------------------------------------------------------------- /src/testGraphics/res/test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fantom-lang/fantom/HEAD/src/testGraphics/res/test.png -------------------------------------------------------------------------------- /src/testSys/locale/en.props: -------------------------------------------------------------------------------- 1 | // en.props 2 | 3 | a=a en 4 | b=b en 5 | c=c en 6 | d=d en 7 | e=e en 8 | f=f en -------------------------------------------------------------------------------- /src/doc/docLang/doc/deployment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fantom-lang/fantom/HEAD/src/doc/docLang/doc/deployment.png -------------------------------------------------------------------------------- /bin/fan: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 4 | # fan: launcher for Fan programs 5 | # 6 | 7 | . "${0%/*}/fanlaunch" 8 | fanlaunch Fan "$@" 9 | -------------------------------------------------------------------------------- /bin/fanr: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 4 | # fanr: Fan Repository Manager 5 | # 6 | 7 | . "${0%/*}/fanlaunch" 8 | fanlaunch Fan fanr "$@" -------------------------------------------------------------------------------- /bin/flux: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 4 | # flux: Fan Developer UI 5 | # 6 | 7 | . "${0%/*}/fanlaunch" 8 | fanlaunch Fan flux "$@" 9 | -------------------------------------------------------------------------------- /bin/jstub: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 4 | # jstub: launcher for JStub program 5 | # 6 | 7 | . "${0%/*}/fanlaunch" 8 | fanlaunch Jstub "$@" -------------------------------------------------------------------------------- /src/doc/docDomkit/doc/Modal-Popup-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fantom-lang/fantom/HEAD/src/doc/docDomkit/doc/Modal-Popup-1.png -------------------------------------------------------------------------------- /bin/fanp: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 4 | # fanp: fcode disassembler 5 | # 6 | 7 | . "${0%/*}/fanlaunch" 8 | fanlaunch Fan "compiler::Fanp" "$@" -------------------------------------------------------------------------------- /bin/fansh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 4 | # fansh: interactive shell 5 | # 6 | 7 | . "${0%/*}/fanlaunch" 8 | fanlaunch Fan fansh "$@" 9 | -------------------------------------------------------------------------------- /src/doc/docDomkit/doc/Control-Button-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fantom-lang/fantom/HEAD/src/doc/docDomkit/doc/Control-Button-1.png -------------------------------------------------------------------------------- /src/doc/docDomkit/doc/Control-Combo-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fantom-lang/fantom/HEAD/src/doc/docDomkit/doc/Control-Combo-1.png -------------------------------------------------------------------------------- /src/doc/docDomkit/doc/Control-Menu-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fantom-lang/fantom/HEAD/src/doc/docDomkit/doc/Control-Menu-1.png -------------------------------------------------------------------------------- /src/doc/docDomkit/doc/Control-Table-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fantom-lang/fantom/HEAD/src/doc/docDomkit/doc/Control-Table-1.png -------------------------------------------------------------------------------- /src/doc/docDomkit/doc/Control-Tree-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fantom-lang/fantom/HEAD/src/doc/docDomkit/doc/Control-Tree-1.png -------------------------------------------------------------------------------- /src/doc/docDomkit/doc/Layout-CardBox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fantom-lang/fantom/HEAD/src/doc/docDomkit/doc/Layout-CardBox.png -------------------------------------------------------------------------------- /src/doc/docDomkit/doc/Layout-FlowBox-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fantom-lang/fantom/HEAD/src/doc/docDomkit/doc/Layout-FlowBox-1.png -------------------------------------------------------------------------------- /src/doc/docDomkit/doc/Layout-FlowBox-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fantom-lang/fantom/HEAD/src/doc/docDomkit/doc/Layout-FlowBox-2.png -------------------------------------------------------------------------------- /src/doc/docDomkit/doc/Layout-FlowBox-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fantom-lang/fantom/HEAD/src/doc/docDomkit/doc/Layout-FlowBox-3.png -------------------------------------------------------------------------------- /src/doc/docDomkit/doc/Layout-GridBox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fantom-lang/fantom/HEAD/src/doc/docDomkit/doc/Layout-GridBox.png -------------------------------------------------------------------------------- /src/doc/docDomkit/doc/Layout-WellBox-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fantom-lang/fantom/HEAD/src/doc/docDomkit/doc/Layout-WellBox-1.png -------------------------------------------------------------------------------- /src/doc/docDomkit/doc/Modal-Dialog-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fantom-lang/fantom/HEAD/src/doc/docDomkit/doc/Modal-Dialog-1.png -------------------------------------------------------------------------------- /src/doc/docDomkit/doc/Control-Checkbox-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fantom-lang/fantom/HEAD/src/doc/docDomkit/doc/Control-Checkbox-1.png -------------------------------------------------------------------------------- /src/doc/docDomkit/doc/Control-TextArea-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fantom-lang/fantom/HEAD/src/doc/docDomkit/doc/Control-TextArea-1.png -------------------------------------------------------------------------------- /bin/fanc: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 4 | # fanc: Fan Compiler tools 5 | # 6 | 7 | . "${0%/*}/fanlaunch" 8 | fanlaunch Fan fanc "$@" 9 | 10 | -------------------------------------------------------------------------------- /src/doc/docDomkit/doc/Control-ListButton-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fantom-lang/fantom/HEAD/src/doc/docDomkit/doc/Control-ListButton-1.png -------------------------------------------------------------------------------- /src/doc/docDomkit/doc/Control-ListButton-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fantom-lang/fantom/HEAD/src/doc/docDomkit/doc/Control-ListButton-2.png -------------------------------------------------------------------------------- /src/doc/docDomkit/doc/Control-ProgressBar-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fantom-lang/fantom/HEAD/src/doc/docDomkit/doc/Control-ProgressBar-1.png -------------------------------------------------------------------------------- /src/doc/docDomkit/doc/Control-RadioButton-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fantom-lang/fantom/HEAD/src/doc/docDomkit/doc/Control-RadioButton-1.png -------------------------------------------------------------------------------- /src/doc/docDomkit/doc/Control-TextField-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fantom-lang/fantom/HEAD/src/doc/docDomkit/doc/Control-TextField-1.png -------------------------------------------------------------------------------- /src/doc/docDomkit/doc/Control-ToggleButton-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fantom-lang/fantom/HEAD/src/doc/docDomkit/doc/Control-ToggleButton-1.png -------------------------------------------------------------------------------- /etc/sys/log.props: -------------------------------------------------------------------------------- 1 | // 2 | // log.props 3 | // 4 | // LogLevels: debug, info, warn, err, silent 5 | // 6 | 7 | // typedb=debug 8 | // web=err 9 | 10 | 11 | -------------------------------------------------------------------------------- /bin/fant: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 4 | # fant: unit tester 5 | # 6 | 7 | # To run original Java version: 8 | # fanlaunch Fant "$@" 9 | 10 | . "${0%/*}/fanlaunch" 11 | fanlaunch Fan "util::TestRunner" "$@" 12 | 13 | -------------------------------------------------------------------------------- /src/fansc/FanSc/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/domkit/css/Label.css: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2015, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 4 Nov 2015 Andy Frank Creation 7 | // 8 | 9 | span.domkit-Label {} 10 | -------------------------------------------------------------------------------- /src/domkit/css/CardBox.css: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2015, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 19 Mar 2015 Andy Frank Creation 7 | // 8 | 9 | div.domkit-CardBox { 10 | } -------------------------------------------------------------------------------- /src/domkit/css/FlowBox.css: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2015, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 12 Aug 2015 Andy Frank Creation 7 | // 8 | 9 | div.domkit-FlowBox { 10 | } -------------------------------------------------------------------------------- /src/util/es/SecureRandomPeer.js: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2023, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 17 Mar 2023 Matthew Giannini Creation 7 | // 8 | 9 | /** 10 | * SecureRandom. 11 | */ -------------------------------------------------------------------------------- /src/util/es/SeededRandomPeer.js: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2023, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 17 Mar 2023 Matthew Giannini Creation 7 | // 8 | 9 | /** 10 | * SeededRandom. 11 | */ -------------------------------------------------------------------------------- /src/util/js/SecureRandomPeer.js: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2023, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 17 Mar 2023 Matthew Giannini Creation 7 | // 8 | 9 | /** 10 | * SecureRandom. 11 | */ -------------------------------------------------------------------------------- /src/util/js/SeededRandomPeer.js: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2023, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 17 Mar 2023 Matthew Giannini Creation 7 | // 8 | 9 | /** 10 | * SeededRandom. 11 | */ -------------------------------------------------------------------------------- /src/domkit/css/ScrollBox.css: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2014, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 22 Dec 2014 Andy Frank Creation 7 | // 8 | 9 | div.domkit-ScrollBox { 10 | overflow: auto; 11 | } -------------------------------------------------------------------------------- /src/domkit/css/ProgressBar.css: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 12 May 2016 Andy Frank Creation 7 | // 8 | 9 | div.domkit-ProgressBar { 10 | width: 200px; 11 | } -------------------------------------------------------------------------------- /src/sys/dotnet/fan/sys/Facet.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2010, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 03 Feb 10 Brian Frank Creation 7 | // 8 | 9 | namespace Fan.Sys 10 | { 11 | public interface Facet 12 | { 13 | } 14 | } -------------------------------------------------------------------------------- /src/domkit/css/AccordianBox.css: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 17 Jun 2016 Andy Frank Creation 7 | // 8 | 9 | div.domkit-AccordionBox { 10 | overflow-x: hidden; 11 | overflow-y: auto; 12 | } -------------------------------------------------------------------------------- /bin/flux.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | REM 3 | REM Copyright (c) 2015, Brian Frank and Andy Frank 4 | REM Licensed under the Academic Free License version 3.0 5 | REM 6 | REM History: 7 | REM 27 Jul 2015 Matthew Giannini Creation 8 | REM 9 | REM flux: Fantom Developer UI 10 | REM 11 | 12 | call "%~fs0\..\fanlaunch.bat" Fan flux %* 13 | -------------------------------------------------------------------------------- /src/domkit/css/TextArea.css: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2014, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 21 Dec 2014 Andy Frank Creation 7 | // 8 | 9 | textarea.domkit-TextArea { 10 | width: 100%; 11 | height: 100%; 12 | outline: none; 13 | } 14 | -------------------------------------------------------------------------------- /src/domkit/css/WellBox.css: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2017, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 14 Mar 2017 Andy Frank Creation 7 | // 8 | 9 | div.domkit-WellBox { 10 | background: #e5e5e5; 11 | border-radius: 4px; 12 | padding: 10px; 13 | } -------------------------------------------------------------------------------- /bin/fanc.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | REM 3 | REM Copyright (c) 2025, Brian Frank and Andy Frank 4 | REM Licensed under the Academic Free License version 3.0 5 | REM 6 | REM History: 7 | REM 12 May 2025 Brian Frank Creation 8 | REM 9 | REM fanr: Fantom compiler tools 10 | REM 11 | 12 | call "%~fs0\..\fanlaunch.bat" Fan fanc %* 13 | 14 | -------------------------------------------------------------------------------- /bin/fansh.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | REM 3 | REM Copyright (c) 2015, Brian Frank and Andy Frank 4 | REM Licensed under the Academic Free License version 3.0 5 | REM 6 | REM History: 7 | REM 27 Jul 2015 Matthew Giannini Creation 8 | REM 9 | REM fansh: interactive shell 10 | REM 11 | 12 | call "%~fs0\..\fanlaunch.bat" Fan fansh %* 13 | -------------------------------------------------------------------------------- /bin/fanr.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | REM 3 | REM Copyright (c) 2015, Brian Frank and Andy Frank 4 | REM Licensed under the Academic Free License version 3.0 5 | REM 6 | REM History: 7 | REM 27 Jul 2015 Matthew Giannini Creation 8 | REM 9 | REM fanr: Fantom repository manager 10 | REM 11 | 12 | call "%~fs0\..\fanlaunch.bat" Fan fanr %* 13 | -------------------------------------------------------------------------------- /bin/jstub.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | REM 3 | REM Copyright (c) 2015, Brian Frank and Andy Frank 4 | REM Licensed under the Academic Free License version 3.0 5 | REM 6 | REM History: 7 | REM 27 Jul 2015 Matthew Giannini Creation 8 | REM 9 | REM jstub: launcher for JStub program 10 | REM 11 | 12 | call "%~fs0\..\fanlaunch.bat" Jstub %* 13 | -------------------------------------------------------------------------------- /bin/fanp.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | REM 3 | REM Copyright (c) 2015, Brian Frank and Andy Frank 4 | REM Licensed under the Academic Free License version 3.0 5 | REM 6 | REM History: 7 | REM 27 Jul 2015 Matthew Giannini Creation 8 | REM 9 | REM fanp: fcode disassembler 10 | REM 11 | 12 | call "%~fs0\..\fanlaunch.bat" Fan "compiler::Fanp" %* 13 | -------------------------------------------------------------------------------- /bin/fant.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | REM 3 | REM Copyright (c) 2015, Brian Frank and Andy Frank 4 | REM Licensed under the Academic Free License version 3.0 5 | REM 6 | REM History: 7 | REM 27 Jul 2015 Matthew Giannini Creation 8 | REM 9 | REM fant: unit tester 10 | REM 11 | 12 | call "%~fs0\..\fanlaunch.bat" Fan "util::TestRunner" %* 13 | 14 | -------------------------------------------------------------------------------- /src/sys/locale/en-US.props: -------------------------------------------------------------------------------- 1 | // 2 | // sys::en-US.props 3 | // 4 | 5 | ////////////////////////////////////////////////////////////////////////// 6 | // DateTime (use PM) 7 | ////////////////////////////////////////////////////////////////////////// 8 | 9 | // default toLocale patterns 10 | dateTime=D-MMM-YYYY WWW k:mm:ssAA zzz 11 | time=k:mmAA -------------------------------------------------------------------------------- /bin/fan.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | REM 3 | REM Copyright (c) 2015, Brian Frank and Andy Frank 4 | REM Licensed under the Academic Free License version 3.0 5 | REM 6 | REM History: 7 | REM 27 Jul 2015 Matthew Giannini Creation 8 | REM 9 | REM fan: launcher for Fantom programs 10 | REM 11 | 12 | call "%~fs0\..\fanlaunch.bat" Fan %* 13 | EXIT /B %errorlevel% 14 | -------------------------------------------------------------------------------- /src/domkit/css/FlexBox.css: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2014, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 19 Dec 2014 Andy Frank Creation 7 | // 8 | 9 | div.domkit-FlexBox { 10 | display: -webkit-flex; 11 | display: -moz-flex; 12 | display: -ms-flex; 13 | display: flex; 14 | } -------------------------------------------------------------------------------- /src/testNative/java/Foo.java: -------------------------------------------------------------------------------- 1 | 2 | package bar.baz; 3 | 4 | import fan.sys.*; 5 | 6 | public class Foo 7 | { 8 | 9 | public Date today() { return Date.today(); } 10 | 11 | public String toString() { return getClass().getName(); } 12 | 13 | public static class Inner 14 | { 15 | public String toString() { return "Foo.Inner!"; } 16 | } 17 | 18 | } -------------------------------------------------------------------------------- /src/domkit/css/Box.css: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2014, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 19 Dec 2014 Andy Frank Creation 7 | // 8 | 9 | div.domkit-Box { 10 | display: block; 11 | box-sizing: border-box; 12 | position: relative; 13 | width: 100%; 14 | height: 100%; 15 | } -------------------------------------------------------------------------------- /src/sys/js/fan/Void.js: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2009, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 3 Dec 09 Andy Frank Creation 7 | // 8 | 9 | /** 10 | * Void 11 | */ 12 | fan.sys.Void = function() {}; 13 | fan.sys.Void.prototype.$typeof = function() { return fan.sys.Void.$type; } 14 | 15 | -------------------------------------------------------------------------------- /src/testJava/fan/JavaImplTest.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2025, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 19 May 25 Brian Frank Creation 7 | // 8 | 9 | ** 10 | ** Run the tests written in Java itself 11 | ** 12 | class JavaImplTest : Test 13 | { 14 | native Void test() 15 | } 16 | 17 | -------------------------------------------------------------------------------- /src/testJava/fan/JavaTest.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2008, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 20 Nov 08 Brian Frank Creation 7 | // 8 | 9 | ** 10 | ** Base class for Java compiler tests. 11 | ** 12 | abstract class JavaTest : testCompiler::CompilerTest 13 | { 14 | } 15 | 16 | -------------------------------------------------------------------------------- /src/sys/java/fan/sys/Facet.java: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2010, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 03 Feb 10 Brian Frank Creation 7 | // 8 | package fan.sys; 9 | 10 | /** 11 | * Facet is a mixin included into every facet type. 12 | */ 13 | public interface Facet 14 | { 15 | } 16 | 17 | -------------------------------------------------------------------------------- /src/domkit/css/SashBox.css: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2015, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 6 Jun 2015 Andy Frank Creation 7 | // 8 | 9 | div.domkit-SashBox { 10 | overflow: hidden; /* required for dir=right */ 11 | position: relative; 12 | } 13 | 14 | div.domkit-SashBox-div {} 15 | -------------------------------------------------------------------------------- /src/domkit/css/TextField.css: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2014, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 21 Dec 2014 Andy Frank Creation 7 | // 8 | 9 | input.domkit-TextField { 10 | outline: none; 11 | } 12 | 13 | input.domkit-TextField[type='password'] { 14 | font-family: sans-serif; 15 | } 16 | -------------------------------------------------------------------------------- /src/sys/fan/Facet.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2010, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 03 Feb 10 Brian Frank Creation 7 | // 8 | 9 | ** 10 | ** Facet is a mixin included into every facet type. 11 | ** 12 | ** See `docLang::Facets` for details. 13 | ** 14 | const mixin Facet 15 | { 16 | } 17 | -------------------------------------------------------------------------------- /src/sys/java/fanx/test/TestAnnoA.java: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2010, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 10 Sep 10 Brian Frank Creation 7 | // 8 | package fanx.test; 9 | 10 | import java.lang.annotation.*; 11 | 12 | @Retention(RetentionPolicy.RUNTIME) 13 | public @interface TestAnnoA 14 | { 15 | } -------------------------------------------------------------------------------- /src/asn1/fan/AsnErr.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2021, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 05 Aug 2021 Matthew Giannini Creation 7 | // 8 | 9 | ** 10 | ** A general ASN.1 error 11 | ** 12 | const class AsnErr : Err 13 | { 14 | new make(Str msg := "", Err? cause := null) : super(msg, cause) { } 15 | } 16 | -------------------------------------------------------------------------------- /src/domkit/css/GridBox.css: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2015, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 15 Feb 2015 Andy Frank Creation 7 | // 8 | 9 | div.domkit-GridBox { 10 | } 11 | 12 | div.domkit-GridBox table { 13 | border-collapse: collapse; 14 | } 15 | 16 | div.domkit-GridBox table td { 17 | padding: 0; 18 | } -------------------------------------------------------------------------------- /src/domkit/fan/Dir.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2015, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 7 Oct 2015 Andy Frank Creation 7 | // 8 | 9 | using dom 10 | 11 | ** 12 | ** Direction enums: up, down, left, right 13 | ** 14 | @Js enum class Dir 15 | { 16 | up, 17 | down, 18 | left, 19 | right 20 | } 21 | 22 | -------------------------------------------------------------------------------- /src/sys/es/fan/Service.js: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2023, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 17 Mar 2023 Matthew Giannini Creation 7 | // 25 Apr 2023 Matthew Giannini Refactor for ES 8 | // 9 | 10 | /** 11 | * Service. 12 | */ 13 | class Service extends Obj { 14 | constructor() { super(); } 15 | 16 | } -------------------------------------------------------------------------------- /src/sys/es/fan/This.js: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2010, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 15 Mar 2010 Andy Frank Creation 7 | // 13 Apr 2023 Matthew Giannini Refactor for ES 8 | // 9 | 10 | /** 11 | * This. 12 | */ 13 | class This extends Obj { 14 | constructor() { super(); } 15 | 16 | } 17 | 18 | -------------------------------------------------------------------------------- /src/domkit/css/Button.css: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2014, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 19 Dec 2014 Andy Frank Creation 7 | // 8 | 9 | div.domkit-Button { 10 | outline: none; 11 | } 12 | 13 | div.domkit-Button:focus { 14 | z-index: 2; 15 | position: relative; /* needed to make z-index work */ 16 | } 17 | -------------------------------------------------------------------------------- /src/sys/java/fan/sys/Void.java: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2006, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 4 Dec 05 Brian Frank Creation 7 | // 8 | package fan.sys; 9 | 10 | /** 11 | * Void is the absence of a type. 12 | */ 13 | public class Void 14 | { 15 | 16 | public Type typeof() { return Sys.VoidType; } 17 | 18 | } -------------------------------------------------------------------------------- /src/sys/java/fanx/test/TestAnnoB.java: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2010, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 10 Sep 10 Brian Frank Creation 7 | // 8 | package fanx.test; 9 | 10 | import java.lang.annotation.*; 11 | 12 | @Retention(RetentionPolicy.RUNTIME) 13 | public @interface TestAnnoB 14 | { 15 | String value(); 16 | } -------------------------------------------------------------------------------- /src/util/es/BoolArray.js: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2023, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 17 Mar 2023 Matthew Giannini Creation 7 | // 11 Jul 2023 Matthew Giannini Refactor for ES 8 | // 9 | 10 | /** 11 | * BoolArray. 12 | */ 13 | class BoolArray extends sys.Obj { 14 | typeof() { return BoolArray.type$; } 15 | } -------------------------------------------------------------------------------- /bin/fansubstitute: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 4 | # fan: launcher for Fan using an alternate installation 5 | # this script is used during bootstrap build 6 | # 7 | 8 | if [ -z "$FAN_SUBSTITUTE" -o ! -d "$FAN_SUBSTITUTE" ] ; then 9 | echo ERROR: must export the FAN_SUBSTITUTE env variable 10 | exit 1 11 | fi 12 | 13 | export FAN_HOME=$FAN_SUBSTITUTE 14 | 15 | . "${0%/*}/fanlaunch" 16 | fanlaunch Fan "$@" 17 | -------------------------------------------------------------------------------- /src/domkit/css/Dnd.css: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2015, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 13 Jul 2015 Andy Frank Creation 7 | // 8 | 9 | .domkit-dnd-over::after { 10 | content: ""; 11 | position: absolute; 12 | top: 0; 13 | left: 0; 14 | width: 100%; 15 | height: 100%; 16 | background: #2ecc71; 17 | opacity: 0.3; 18 | } -------------------------------------------------------------------------------- /src/markdown/test/DelimiterProcessorTest.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2024, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 25 Oct 2024 Matthew Giannini Creation 7 | // 8 | 9 | class DelimiterProcessorTest : CoreRenderingTest 10 | { 11 | // Void testDelimiterProcessorWithInvalidDelimiterUse() 12 | // { 13 | // // TODO: need pluggable 14 | // } 15 | } -------------------------------------------------------------------------------- /src/sys/fan/Endian.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2009, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 18 Dec 09 Brian Frank Creation 7 | // 8 | 9 | ** 10 | ** Byte ordering. 11 | ** 12 | enum class Endian 13 | { 14 | ** Most significant byte first (network byte order) 15 | big, 16 | 17 | ** Least significant byte first 18 | little 19 | 20 | } 21 | 22 | -------------------------------------------------------------------------------- /src/sys/fan/Void.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2006, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 9 Jan 06 Brian Frank Creation 7 | // 8 | 9 | ** 10 | ** Void is used to represent the absence of a return value in a Method. 11 | ** 12 | const final class Void 13 | { 14 | 15 | ** 16 | ** Private constructor. 17 | ** 18 | private new make() 19 | 20 | } -------------------------------------------------------------------------------- /src/sys/java/fan/sys/This.java: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2008, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 25 Apr 08 Brian Frank Creation 7 | // 8 | package fan.sys; 9 | 10 | /** 11 | * This represents a method return type which is always "this type". 12 | */ 13 | public class This 14 | { 15 | 16 | public Type typeof() { return Sys.ThisType; } 17 | 18 | } -------------------------------------------------------------------------------- /src/sys/js/fan/Zip.js: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2023, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 21 Mar 2023 Matthew Giannini Creation 7 | // 8 | 9 | /** 10 | * Zip. 11 | */ 12 | fan.sys.Zip = fan.sys.Obj.$extend(fan.sys.Obj); 13 | 14 | fan.sys.Zip.prototype.$ctor = function() {} 15 | fan.sys.Zip.prototype.$typeof = function() { return fan.util.Zip.$type; } -------------------------------------------------------------------------------- /src/sql/fan/SqlErr.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2007, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 30 Feb 07 Brian Frank Creation 7 | // 8 | 9 | ** 10 | ** SqlErr indicates an error from the SQL database driver. 11 | ** 12 | const class SqlErr : Err 13 | { 14 | 15 | new make(Str? msg, Err? cause := null) 16 | : super(msg, cause) 17 | { 18 | } 19 | 20 | } -------------------------------------------------------------------------------- /src/sys/es/fan/Process.js: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2009, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 13 Jul 2023 Matthew Giannini Creation 7 | // 8 | 9 | /** 10 | * Process 11 | */ 12 | class Process extends Obj { 13 | constructor() { super(); } 14 | 15 | static make(cmd=List.make(Str.type$), dir=null) { 16 | throw UnsupportedErr.make(); 17 | } 18 | 19 | } -------------------------------------------------------------------------------- /src/sys/js/fan/This.js: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2010, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 15 Mar 10 Andy Frank Creation 7 | // 8 | 9 | /** 10 | * This. 11 | */ 12 | fan.sys.This = fan.sys.Obj.$extend(fan.sys.Obj); 13 | 14 | fan.sys.This.prototype.$ctor = function() {} 15 | fan.sys.This.prototype.$typeof = function() { return fan.sys.This.$type; } 16 | 17 | -------------------------------------------------------------------------------- /src/domkit/fan/Align.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2015, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 7 Oct 2015 Andy Frank Creation 7 | // 8 | 9 | using dom 10 | 11 | ** 12 | ** Alignment enums: top, left, bottom, right, center, fill 13 | ** 14 | @Js enum class Align 15 | { 16 | top, 17 | left, 18 | bottom, 19 | right, 20 | center, 21 | fill 22 | } 23 | 24 | -------------------------------------------------------------------------------- /src/testDomkit/res/info-white.svg: -------------------------------------------------------------------------------- 1 | 2 | info 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/build/fan/BuildLog.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2006, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 3 Nov 06 Brian Frank Creation 7 | // 8 | 9 | using compiler 10 | 11 | ** 12 | ** BuildLog is used for logging build scripts 13 | ** 14 | class BuildLog : CompilerLog 15 | { 16 | 17 | new make(OutStream out := Env.cur.out) 18 | : super(out) 19 | { 20 | } 21 | 22 | } -------------------------------------------------------------------------------- /src/sys/fan/LogLevel.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2006, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 3 Jul 06 Brian Frank Creation 7 | // 8 | 9 | ** 10 | ** LogLevel provides a set of discrete levels used to customize logging. 11 | ** See `docLang::Logging` for details. 12 | ** 13 | enum class LogLevel 14 | { 15 | debug, 16 | info, 17 | warn, 18 | err, 19 | silent 20 | } -------------------------------------------------------------------------------- /src/sys/java/fanx/serial/Literal.java: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2007, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 20 Aug 07 Brian Frank Creation 7 | // 8 | package fanx.serial; 9 | 10 | /** 11 | * Literal is implemented by sys objects which are encoded as literals. 12 | */ 13 | public interface Literal 14 | { 15 | 16 | public void encode(ObjEncoder out); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /src/concurrent/es/ActorFuture.js: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2023, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 17 Mar 2023 Matthew Giannini Creation 7 | // 22 Jun 2023 Matthew Giannini Refactor for JS 8 | // 9 | 10 | /** 11 | * ActorFuture. 12 | */ 13 | class ActorFuture extends Future { 14 | constructor() { super(); } 15 | 16 | typeof() { return ActorFuture.type$; } 17 | } -------------------------------------------------------------------------------- /src/sys/js/fan/Service.js: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2023, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 17 Mar 2023 Matthew Giannini Creation 7 | // 8 | 9 | /** 10 | * Service. 11 | */ 12 | fan.sys.Service = fan.sys.Obj.$extend(fan.sys.Obj); 13 | 14 | fan.sys.Service.prototype.$ctor = function() {} 15 | fan.sys.Service.prototype.$typeof = function() { return fan.sys.Service.$type; } -------------------------------------------------------------------------------- /src/testDomkit/res/info-grey.svg: -------------------------------------------------------------------------------- 1 | 2 | info 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /etc/sql/config.props: -------------------------------------------------------------------------------- 1 | // 2 | // Config: sql 3 | // 4 | // History: 5 | // 01 Feb 10 Brian Frank Creation 6 | // 7 | 8 | // Java JDBC drivers; these are java classnames separated by a comma 9 | // which are loaded into the VM using Class.forName on startup 10 | // java.drivers=com.mysql.cj.jdbc.Driver 11 | 12 | // Uncomment this line to revert old "@@" escape behavior. 13 | // See https://github.com/fantom-lang/fantom/pull/51 14 | // deprecatedEscape=true 15 | -------------------------------------------------------------------------------- /src/nodeJs/res/testRunnerTemplate.js: -------------------------------------------------------------------------------- 1 | const __require = (m) => { 2 | const name = m.split('.')[0]; 3 | const fan = this.fan; 4 | if (typeof require === 'undefined') return name == "fan" ? fan : fan[name]; 5 | try { return require(`${m}`); } catch (e) { /* ignore */ } 6 | } 7 | 8 | //{{include}} 9 | 10 | //{{envDirs}} 11 | 12 | //{{targets}} 13 | // Delegate to standard TestRunner 14 | sys.Type.find("util::TestRunner").method("main").call(targets); 15 | -------------------------------------------------------------------------------- /src/util/js/IntArray.js: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2023, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 17 Mar 2023 Matthew Giannini Creation 7 | // 8 | 9 | /** 10 | * IntArray. 11 | */ 12 | fan.util.IntArray = fan.sys.Obj.$extend(fan.sys.Obj); 13 | 14 | fan.util.IntArray.prototype.$ctor = function() {} 15 | fan.util.IntArray.prototype.$typeof = function() { return fan.util.IntArray.$type; } -------------------------------------------------------------------------------- /examples/java/hello.fan: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env fan 2 | // 3 | // Copyright (c) 2008, Brian Frank and Andy Frank 4 | // Licensed under the Academic Free License version 3.0 5 | // 6 | // History: 7 | // 18 Dec 08 Brian Frank Creation 8 | // 9 | 10 | using [java] java.lang 11 | 12 | ** 13 | ** Hello world using System.out.println 14 | ** 15 | class HelloWorld 16 | { 17 | 18 | Void main() 19 | { 20 | System.out.println("Java FFI hello world") 21 | } 22 | 23 | } -------------------------------------------------------------------------------- /src/concurrent/js/Lock.js: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2023, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 1 Sep 23 Brian Frank Stub 7 | // 8 | 9 | /** 10 | * Lock 11 | */ 12 | fan.concurrent.Lock = fan.sys.Obj.$extend(fan.sys.Obj); 13 | 14 | fan.concurrent.Lock.prototype.$ctor = function() {} 15 | fan.concurrent.Lock.prototype.$typeof = function() { return fan.concurrent.Lock.$type; } 16 | 17 | -------------------------------------------------------------------------------- /src/sys/dotnet/fan/sys/Void.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2006, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 14 Sep 06 Andy Frank Creation 7 | // 8 | 9 | using System; 10 | 11 | namespace Fan.Sys 12 | { 13 | /// 14 | /// Void is the absence of a type. 15 | /// 16 | public class Void 17 | { 18 | public Type type() { return Sys.VoidType; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/sys/fan/This.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2008, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 25 Apr 08 Brian Frank Creation 7 | // 8 | 9 | ** 10 | ** This represents a method return type which is 11 | ** always [this type]`docLang::Methods#thisReturns`. 12 | ** 13 | const final class This 14 | { 15 | 16 | ** 17 | ** Private constructor. 18 | ** 19 | private new make() 20 | 21 | } -------------------------------------------------------------------------------- /src/util/js/BoolArray.js: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2023, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 17 Mar 2023 Matthew Giannini Creation 7 | // 8 | 9 | /** 10 | * BoolArray. 11 | */ 12 | fan.util.BoolArray = fan.sys.Obj.$extend(fan.sys.Obj); 13 | 14 | fan.util.BoolArray.prototype.$ctor = function() {} 15 | fan.util.BoolArray.prototype.$typeof = function() { return fan.util.BoolArray.$type; } -------------------------------------------------------------------------------- /src/build/fan/FatalBuildErr.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2006, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 4 Nov 06 Brian Frank Creation 7 | // 8 | 9 | ** 10 | ** FatalBuildErr is thrown to immediately terminate 11 | ** the current build script. 12 | ** 13 | const class FatalBuildErr : Err 14 | { 15 | new make(Str msg := "", Err? cause := null) 16 | : super(msg, cause) 17 | { 18 | } 19 | } -------------------------------------------------------------------------------- /src/dom/fan/TextSel.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2022, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 18 Mar 2022 Andy Frank Creation 7 | // 8 | 9 | ** 10 | ** TextSel models the current caret pos and text selection by user. 11 | ** 12 | @NoDoc @Js class TextSel 13 | { 14 | ** Private ctor. 15 | private new make() {} 16 | 17 | ** Clear all selection from page. 18 | native Void clear() 19 | } -------------------------------------------------------------------------------- /src/inet/fan/UnknownHostErr.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2007, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 9 Feb 07 Brian Frank Creation 7 | // 8 | 9 | ** 10 | ** UnknownHostErr indicates a failure to resolve a hostname to an IP address. 11 | ** 12 | const class UnknownHostErr : IOErr 13 | { 14 | 15 | new make(Str msg, Err? cause := null) 16 | : super(msg, cause) 17 | { 18 | } 19 | 20 | } -------------------------------------------------------------------------------- /src/domkit/css/Sheet.css: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 15 Mar 2016 Andy Frank Creation 7 | // 8 | 9 | div.domkit-Sheet { 10 | position: absolute; 11 | overflow: hidden; 12 | outline: none; 13 | } 14 | 15 | div.domkit-Sheet-mask { 16 | position: absolute; 17 | top: 0; 18 | left: 0; 19 | width: 100%; 20 | height: 100%; 21 | z-index: 100; 22 | } -------------------------------------------------------------------------------- /src/sys/es/fan/Void.js: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2009, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 03 Dec 2009 Andy Frank Creation 7 | // 13 Apr 2010 Matthew Giannini Refactor for ES 8 | // 9 | 10 | /** 11 | * Void 12 | */ 13 | class Void extends Obj { 14 | constructor() { super(); } 15 | 16 | 17 | } 18 | // Void = function() {}; 19 | // Void.$typeof = function() { return Void.type$ } 20 | 21 | -------------------------------------------------------------------------------- /src/util/js/FloatArray.js: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2023, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 17 Mar 2023 Matthew Giannini Creation 7 | // 8 | 9 | /** 10 | * FloatArray. 11 | */ 12 | fan.util.FloatArray = fan.sys.Obj.$extend(fan.sys.Obj); 13 | 14 | fan.util.FloatArray.prototype.$ctor = function() {} 15 | fan.util.FloatArray.prototype.$typeof = function() { return fan.util.FloatArray.$type; } -------------------------------------------------------------------------------- /src/sys/fan/ArgErr.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2006, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 21 Jun 06 Brian Frank Creation 7 | // 8 | 9 | ** 10 | ** ArgErr indicates an invalid argument was passed. 11 | ** 12 | const class ArgErr : Err 13 | { 14 | 15 | ** 16 | ** Construct with specified error message and optional root cause. 17 | ** 18 | new make(Str msg := "", Err? cause := null) 19 | 20 | } -------------------------------------------------------------------------------- /src/dom/es/TextSelPeer.js: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2022, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 18 Mar 2022 Andy Frank Creation 7 | // 10 Jun 2023 Kiera O'Flynn Refactor to ES 8 | // 9 | 10 | class TextSelPeer extends sys.Obj { 11 | constructor(self) 12 | { 13 | super(); 14 | this.sel = null; 15 | } 16 | 17 | clear(self) 18 | { 19 | return this.sel.removeAllRanges(); 20 | } 21 | } -------------------------------------------------------------------------------- /src/testNative/fan/NativeClass.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2010, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 12 May 10 Brian Frank Creation 7 | // 8 | 9 | ** 10 | ** NativeClass tests an entire native class, where the 11 | ** class is wholly implemented in Java, C#, etc 12 | ** 13 | native class NativeClass 14 | { 15 | new make() 16 | 17 | Int add(Int a, Int b) 18 | 19 | Str readResource(Str name) 20 | } -------------------------------------------------------------------------------- /src/dom/js/TextSelPeer.js: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2022, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 18 Mar 2022 Andy Frank Creation 7 | // 8 | 9 | fan.dom.TextSelPeer = fan.sys.Obj.$extend(fan.sys.Obj); 10 | fan.dom.TextSelPeer.prototype.$ctor = function(self) 11 | { 12 | this.sel = null; 13 | } 14 | 15 | fan.dom.TextSelPeer.prototype.clear = function(self) 16 | { 17 | return this.sel.removeAllRanges(); 18 | } -------------------------------------------------------------------------------- /src/sys/dotnet/fanx/serial/Literal.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2007, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 11 Sep 07 Brian Frank Creation 7 | // 8 | 9 | namespace Fanx.Serial 10 | { 11 | /// 12 | /// Literal is implemented by sys objects which are encoded as literals. 13 | /// 14 | public interface Literal 15 | { 16 | 17 | void encode(ObjEncoder @out); 18 | 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/domkit/fan/Label.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2015, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 15 Feb 2015 Brian Frank Creation 7 | // 8 | 9 | using dom 10 | 11 | ** 12 | ** Simple text based element. 13 | ** 14 | ** See also: [docDomkit]`docDomkit::Controls#label` 15 | ** 16 | @Js class Label : Elem 17 | { 18 | new make() : super("span") 19 | { 20 | this.style.addClass("domkit-control domkit-Label") 21 | } 22 | } -------------------------------------------------------------------------------- /src/fansc/build.fan: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env fan 2 | // 3 | // Copyright (c) 2015, Brian Frank and Andy Frank 4 | // Licensed under the Academic Free License version 3.0 5 | // 6 | // History: 7 | // 31 Jul 15 Matthew Giannini Creation 8 | // 9 | 10 | using build 11 | 12 | ** 13 | ** Build: fansc.exe 14 | ** 15 | class Build : BuildCs 16 | { 17 | 18 | new make() 19 | { 20 | output = devHomeDir.uri + `bin/fansc.exe` 21 | targetType = "exe" 22 | 23 | srcDirs = [`FanSc/`] 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/sys/dotnet/fan/sys/This.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2008, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 25 Apr 08 Brian Frank Creation 7 | // 8 | 9 | using System; 10 | 11 | namespace Fan.Sys 12 | { 13 | /// 14 | /// This represents a method return type which is always "this type". 15 | /// 16 | public class This 17 | { 18 | public Type type() { return Sys.ThisType; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/sys/fan/Unsafe.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2009, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 8 Feb 09 Brian Frank Creation 7 | // 8 | 9 | ** 10 | ** Unsafe wraps a mutable object as an immutable reference. 11 | ** 12 | const final class Unsafe 13 | { 14 | 15 | ** 16 | ** Wrap specified object. 17 | ** 18 | new make(Obj? val) 19 | 20 | ** 21 | ** Get the wrapped object. 22 | ** 23 | Obj? val() 24 | 25 | } -------------------------------------------------------------------------------- /src/sys/fan/CastErr.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2006, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 21 Jun 06 Brian Frank Creation 7 | // 8 | 9 | ** 10 | ** CastErr is a runtime exception raised when invalid cast is performed. 11 | ** 12 | const class CastErr : Err 13 | { 14 | 15 | ** 16 | ** Construct with specified error message and optional root cause. 17 | ** 18 | new make(Str msg := "", Err? cause := null) 19 | 20 | } -------------------------------------------------------------------------------- /src/sys/fan/IndexErr.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2006, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 11 Jan 06 Brian Frank Creation 7 | // 8 | 9 | ** 10 | ** IndexErr indicates an attempt to access an invalid index in a List. 11 | ** 12 | const class IndexErr : Err 13 | { 14 | 15 | ** 16 | ** Construct with specified error message and optional root cause. 17 | ** 18 | new make(Str msg := "", Err? cause := null) 19 | 20 | } -------------------------------------------------------------------------------- /src/sys/fan/UnsupportedErr.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2006, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 11 Jan 06 Brian Frank Creation 7 | // 8 | 9 | ** 10 | ** UnsupportedErr indicates a feature which isn't supported. 11 | ** 12 | const class UnsupportedErr : Err 13 | { 14 | 15 | ** 16 | ** Construct with specified error message and optional root cause. 17 | ** 18 | new make(Str msg := "", Err? cause := null) 19 | 20 | } -------------------------------------------------------------------------------- /src/sys/js/fan/LocalFileStore.js: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2013, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 12 Sep 13 Brian Frank Creation 7 | // 8 | 9 | /** 10 | * LocalFileStore 11 | */ 12 | 13 | fan.sys.LocalFileStore = fan.sys.Obj.$extend(fan.sys.FileStore); 14 | fan.sys.LocalFileStore.prototype.$ctor = function() {} 15 | fan.sys.LocalFileStore.prototype.$typeof = function() { return fan.sys.LocalFileStore.$type; } 16 | 17 | -------------------------------------------------------------------------------- /src/concurrent/js/ActorFuture.js: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2023, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 17 Mar 2023 Matthew Giannini Creation 7 | // 8 | 9 | /** 10 | * ActorFuture. 11 | */ 12 | fan.concurrent.ActorFuture = fan.sys.Obj.$extend(fan.concurrent.Future); 13 | 14 | fan.concurrent.Future.prototype.$ctor = function() {} 15 | fan.concurrent.Future.prototype.$typeof = function() { return fan.concurrent.ActorFuture.$type; } -------------------------------------------------------------------------------- /src/sys/fan/UnknownPodErr.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2006, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 11 Jan 06 Brian Frank Creation 7 | // 8 | 9 | ** 10 | ** UnknownPodErr indicates an attempt to access a non-existent pod. 11 | ** 12 | const class UnknownPodErr : Err 13 | { 14 | 15 | ** 16 | ** Construct with specified error message and optional root cause. 17 | ** 18 | new make(Str msg := "", Err? cause := null) 19 | 20 | } -------------------------------------------------------------------------------- /src/sys/fan/UnknownKeyErr.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2012, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 09 Mar 12 Brian Frank Creation 7 | // 8 | 9 | ** 10 | ** UnknownKeyErr indicates an attempt to lookup a non-existent key. 11 | ** 12 | const class UnknownKeyErr : Err 13 | { 14 | 15 | ** 16 | ** Construct with specified error message and optional root cause. 17 | ** 18 | new make(Str msg := "", Err? cause := null) 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/sys/fan/UnknownSlotErr.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2006, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 11 Jan 06 Brian Frank Creation 7 | // 8 | 9 | ** 10 | ** UnknownSlotErr indicates an attempt to access a non-existent slot. 11 | ** 12 | const class UnknownSlotErr : Err 13 | { 14 | 15 | ** 16 | ** Construct with specified error message and optional root cause. 17 | ** 18 | new make(Str msg := "", Err? cause := null) 19 | 20 | } -------------------------------------------------------------------------------- /src/sys/fan/UnknownTypeErr.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2006, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 11 Jan 06 Brian Frank Creation 7 | // 8 | 9 | ** 10 | ** UnknownTypeErr indicates an attempt to access a non-existent type. 11 | ** 12 | const class UnknownTypeErr : Err 13 | { 14 | 15 | ** 16 | ** Construct with specified error message and optional root cause. 17 | ** 18 | new make(Str msg := "", Err? cause := null) 19 | 20 | } -------------------------------------------------------------------------------- /src/sys/fan/UnresolvedErr.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2007, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 24 Nov 07 Brian Frank Creation 7 | // 8 | 9 | ** 10 | ** UnresolvedErr indicates the failure to resolve a Uri to a resource. 11 | ** 12 | const class UnresolvedErr : Err 13 | { 14 | 15 | ** 16 | ** Construct with specified error message and optional root cause. 17 | ** 18 | new make(Str msg := "", Err? cause := null) 19 | 20 | } -------------------------------------------------------------------------------- /src/build/fan/Facets.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2010, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 4 Feb 10 Brian Frank Creation 7 | // 8 | 9 | ** 10 | ** Target facet is applied to a `BuildScript` method to 11 | ** indicate it is a build target or goal. 12 | ** 13 | facet class Target 14 | { 15 | ** 16 | ** String for usage help, should be a single short line summary of target 17 | ** 18 | const Str help := "" 19 | } 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/crypto/fan/Csr.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2021, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 13 Aug 2021 Matthew Giannini Creation 7 | // 8 | 9 | ** 10 | ** A Certificate Signing Request (CSR) 11 | ** 12 | const mixin Csr 13 | { 14 | ** Get the public key for the CSR 15 | abstract PubKey pub() 16 | 17 | ** Get the subject dn 18 | abstract Str subject() 19 | 20 | ** Get the immutable signing options 21 | abstract Str:Obj opts() 22 | } -------------------------------------------------------------------------------- /src/sys/fan/IOErr.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2006, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 11 Jan 06 Brian Frank Creation 7 | // 8 | 9 | ** 10 | ** IOErr indicates an input/output error typically associated 11 | ** with a file system or socket. 12 | ** 13 | const class IOErr : Err 14 | { 15 | 16 | ** 17 | ** Construct with specified error message and optional root cause. 18 | ** 19 | new make(Str msg := "", Err? cause := null) 20 | 21 | } -------------------------------------------------------------------------------- /src/testJava/java/JavaImplTestPeer.java: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2025, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 19 May 25 Brian Frank Creation 7 | // 8 | package fan.testJava; 9 | 10 | public class JavaImplTestPeer 11 | { 12 | public static JavaImplTestPeer make(JavaImplTest self) 13 | { 14 | return new JavaImplTestPeer(); 15 | } 16 | 17 | public void test(JavaImplTest self) 18 | { 19 | Test.test(""); 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /src/concurrent/es/Lock.js: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2023, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 1 Sep 23 Brian Frank Stub 7 | // 8 | 9 | /** 10 | * Lock 11 | */ 12 | class Lock extends sys.Obj { 13 | 14 | constructor() { super(); } 15 | 16 | typeof() { return Lock.type$; } 17 | 18 | static makeReentrant() { return new Lock(); } 19 | 20 | lock() { } 21 | 22 | unlock() { } 23 | 24 | tryLock(timeout=null) { return true; } 25 | 26 | } -------------------------------------------------------------------------------- /src/sys/fan/TimeoutErr.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2009, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 27 Mar 09 Brian Frank Creation 7 | // 8 | 9 | ** 10 | ** TimeoutErr indicates that a blocking operation 11 | ** timed out before normal completion. 12 | ** 13 | const class TimeoutErr : Err 14 | { 15 | 16 | ** 17 | ** Construct with specified error message and optional root cause. 18 | ** 19 | new make(Str msg := "", Err? cause := null) 20 | 21 | } -------------------------------------------------------------------------------- /etc/syntax/syntax-batch.fog: -------------------------------------------------------------------------------- 1 | // 2 | // Syntax rules for DOS Batch 3 | // 4 | // History: 5 | // 14 Aug 08 Brian Frank Creation 6 | // 7 | 8 | using syntax 9 | 10 | SyntaxRules 11 | { 12 | // list of end of line comment tokens 13 | comments = ["REM", "rem"] 14 | 15 | // block comments 16 | blockCommentStart = null 17 | blockCommentEnd = null 18 | blockCommentsNest = false 19 | 20 | // string and character literals 21 | strs = null 22 | 23 | // keyword list 24 | keywords = null 25 | } 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/domkit/pod.fandoc: -------------------------------------------------------------------------------- 1 | ************************************************************************** 2 | ** title: DomKit 3 | ** author: Andy Frank 4 | ** created: 31 Mar 2015 5 | ** copyright: Copyright (c) 2014, Brian Frank and Andy Frank 6 | ************************************************************************** 7 | 8 | Overview [#overview] 9 | ******************** 10 | DomKit is a HTML5 UI toolkit designed for building Web-based user interfaces. 11 | 12 | See [docDomkit]`docDomkit::Intro` for full documentation. 13 | -------------------------------------------------------------------------------- /src/sys/fan/ConstErr.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2009, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 9 Apr 09 Brian Frank Creation 7 | // 8 | 9 | ** 10 | ** ConstErr indicates an attempt to set a const field after 11 | ** the object has been constructed. 12 | ** 13 | const class ConstErr : Err 14 | { 15 | 16 | ** 17 | ** Construct with specified error message and optional root cause. 18 | ** 19 | new make(Str msg := "", Err? cause := null) 20 | 21 | } -------------------------------------------------------------------------------- /src/sys/fan/InterruptedErr.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2007, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 28 Jan 07 Brian Frank Creation 7 | // 8 | 9 | ** 10 | ** InterruptedErr indicates that a thread is interrupted from 11 | ** its normal execution. 12 | ** 13 | const class InterruptedErr : Err 14 | { 15 | 16 | ** 17 | ** Construct with specified error message and optional root cause. 18 | ** 19 | new make(Str msg := "", Err? cause := null) 20 | 21 | } -------------------------------------------------------------------------------- /src/sys/fan/NameErr.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2007, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 28 Dec 07 Brian Frank Creation 7 | // 8 | 9 | ** 10 | ** NameErr indicates an attempt to use an invalid name. 11 | ** See `Uri.isName` and `Uri.checkName`. 12 | ** 13 | const class NameErr : Err 14 | { 15 | 16 | ** 17 | ** Construct with specified error message and optional root cause. 18 | ** 19 | new make(Str msg := "", Err? cause := null) 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/crypto/fan/Jwk.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2024, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 21 Mar 2024 Ross Schwalm Creation 7 | // 8 | 9 | ** 10 | ** Models a JSON Web Key (JWK) as specified by [RFC7517]`https://datatracker.ietf.org/doc/html/rfc7517` 11 | ** 12 | ** JWKs wrap a Key[`Key`] object with additional metadata 13 | ** 14 | const mixin Jwk 15 | { 16 | ** Jwk 17 | abstract Str:Obj meta() 18 | 19 | ** Key 20 | abstract Key key() 21 | } 22 | 23 | -------------------------------------------------------------------------------- /src/domkit/css/Menu.css: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2015, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 13 May 2015 Andy Frank Creation 7 | // 8 | 9 | div.domkit-Menu { 10 | background: #fff !important; 11 | border-radius: 3px; 12 | overflow: auto; 13 | outline: none; 14 | padding: 5px 0; 15 | } 16 | 17 | div.domkit-MenuItem { 18 | display: block; 19 | padding-left: 10px; 20 | padding-right: 20px; 21 | min-width: 100px; 22 | cursor: default; 23 | } 24 | -------------------------------------------------------------------------------- /src/sys/dotnet/fan/sys/Js.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2010, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 4 Feb 10 Brian Frank Creation 7 | // 8 | 9 | namespace Fan.Sys 10 | { 11 | public sealed class Js : FanObj, Facet 12 | { 13 | public static readonly Js m_defVal = new Js(); 14 | 15 | private Js() {} 16 | 17 | public override Type @typeof() { return Sys.JsType; } 18 | 19 | public override string toStr() { return @typeof().qname(); } 20 | } 21 | } -------------------------------------------------------------------------------- /src/sys/fan/CancelledErr.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2009, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 26 Mar 09 Brian Frank Creation 7 | // 8 | 9 | ** 10 | ** CancelledErr indicates that an operation was cancelled 11 | ** before it completed normally. 12 | ** 13 | const class CancelledErr : Err 14 | { 15 | 16 | ** 17 | ** Construct with specified error message and optional root cause. 18 | ** 19 | new make(Str msg := "", Err? cause := null) 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/sys/fan/FieldNotSetErr.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2010, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 23 Mar 10 Brian Frank Creation 7 | // 8 | 9 | ** 10 | ** FieldNotSetErr indicates a non-nullable field was not 11 | ** set by the constructor it-block. 12 | ** 13 | const class FieldNotSetErr : Err 14 | { 15 | 16 | ** 17 | ** Construct with specified error message and optional root cause. 18 | ** 19 | new make(Str msg := "", Err? cause := null) 20 | 21 | } -------------------------------------------------------------------------------- /src/sys/java/fanx/interop/IntArray.java: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2008, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 04 Dec 08 Brian Frank Creation 7 | // 8 | package fanx.interop; 9 | 10 | /** 11 | * IntArray dummy class for int[] 12 | */ 13 | public class IntArray 14 | { 15 | public static IntArray make(int size) { return null; } 16 | public int get(int index) { return 0; } 17 | public void set(int index, int val) {} 18 | public int size() { return 0; } 19 | } -------------------------------------------------------------------------------- /src/sys/fan/ReadonlyErr.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2006, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 7 Apr 06 Brian Frank Creation 7 | // 8 | 9 | ** 10 | ** ReadonlyErr indicates an attempt to modify a readonly instance. 11 | ** It is commonly used with List and Map. 12 | ** 13 | const class ReadonlyErr : Err 14 | { 15 | 16 | ** 17 | ** Construct with specified error message and optional root cause. 18 | ** 19 | new make(Str msg := "", Err? cause := null) 20 | 21 | } -------------------------------------------------------------------------------- /src/sys/java/fanx/interop/ByteArray.java: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2008, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 04 Dec 08 Brian Frank Creation 7 | // 8 | package fanx.interop; 9 | 10 | /** 11 | * ByteArray dummy class for byte[] 12 | */ 13 | public class ByteArray 14 | { 15 | public static ByteArray make(int size) { return null; } 16 | public byte get(int index) { return 0; } 17 | public void set(int index, byte val) {} 18 | public int size() { return 0; } 19 | } -------------------------------------------------------------------------------- /src/sys/java/fanx/interop/CharArray.java: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2008, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 04 Dec 08 Brian Frank Creation 7 | // 8 | package fanx.interop; 9 | 10 | /** 11 | * CharArray dummy class for char[] 12 | */ 13 | public class CharArray 14 | { 15 | public static CharArray make(int size) { return null; } 16 | public char get(int index) { return 0; } 17 | public void set(int index, char val) {} 18 | public int size() { return 0; } 19 | } -------------------------------------------------------------------------------- /src/sys/java/fanx/interop/LongArray.java: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2008, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 04 Dec 08 Brian Frank Creation 7 | // 8 | package fanx.interop; 9 | 10 | /** 11 | * LongArray dummy class for long[] 12 | */ 13 | public class LongArray 14 | { 15 | public static LongArray make(int size) { return null; } 16 | public long get(int index) { return 0; } 17 | public void set(int index, long val) {} 18 | public int size() { return 0; } 19 | } -------------------------------------------------------------------------------- /adm/unixsetup: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | # 4 | # unixsetup: chmod +x on all fan scripts 5 | # 6 | # TODO: need to add examples/ scripts 7 | # 8 | 9 | . "${0%/*}/../bin/fanlaunch" 10 | echo "###" 11 | echo "### FAN_HOME=$FAN_HOME" 12 | echo "###" 13 | 14 | # this is a test comment for email notification, but do i really need .exe? 15 | chmod +x $FAN_HOME/bin/* 16 | find $FAN_HOME \ 17 | \( -name "*.exe" -o -name "build*.fan" -o -name 'boot*.fan' \) \ 18 | -exec chmod +x {} \; 19 | find $FAN_HOME/examples -name '*.fan' \ 20 | -exec chmod +x {} \; 21 | -------------------------------------------------------------------------------- /src/domkit/fan/Box.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2014, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 19 Dec 2014 Andy Frank Creation 7 | // 8 | 9 | using dom 10 | 11 | ** 12 | ** Box defaults style to: 13 | ** 14 | ** display: block; 15 | ** box-sizing: border-box; 16 | ** width: 100%; 17 | ** height: 100%; 18 | ** position: relative; 19 | ** 20 | @Js class Box : Elem 21 | { 22 | new make() : super("div") 23 | { 24 | this.style.addClass("domkit-Box") 25 | } 26 | } -------------------------------------------------------------------------------- /src/sys/dotnet/fan/sys/Number.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2006, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 20 Oct 08 Andy Frank Creation 7 | // 8 | 9 | namespace Fan.Sys 10 | { 11 | /// 12 | /// Temp wrapper for numberic primitives 13 | /// 14 | public abstract class Number 15 | { 16 | public abstract double doubleValue(); 17 | public abstract float floatValue(); 18 | public abstract int intValue(); 19 | public abstract long longValue(); 20 | } 21 | } -------------------------------------------------------------------------------- /src/sys/java/fanx/interop/FloatArray.java: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2008, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 04 Dec 08 Brian Frank Creation 7 | // 8 | package fanx.interop; 9 | 10 | /** 11 | * FloatArray dummy class for float[] 12 | */ 13 | public class FloatArray 14 | { 15 | public static FloatArray make(int size) { return null; } 16 | public float get(int index) { return 0; } 17 | public void set(int index, float val) {} 18 | public int size() { return 0; } 19 | } -------------------------------------------------------------------------------- /src/sys/java/fanx/interop/ShortArray.java: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2008, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 04 Dec 08 Brian Frank Creation 7 | // 8 | package fanx.interop; 9 | 10 | /** 11 | * ShortArray dummy class for short[] 12 | */ 13 | public class ShortArray 14 | { 15 | public static ShortArray make(int size) { return null; } 16 | public short get(int index) { return 0; } 17 | public void set(int index, short val) {} 18 | public int size() { return 0; } 19 | } -------------------------------------------------------------------------------- /src/sys/es/fan/Unsafe.js: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2009, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 04 Jun 2010 Brian Frank Creation 7 | // 25 Apr 2023 Matthew Giannini Refactor for ES 8 | // 9 | 10 | /** 11 | * Unsafe. 12 | */ 13 | class Unsafe extends Obj { 14 | 15 | constructor(val) { 16 | super(); 17 | this.#val = val; 18 | } 19 | 20 | #val; 21 | 22 | static make(val) { return new Unsafe(val); } 23 | 24 | 25 | 26 | val() { return this.#val; } 27 | 28 | } -------------------------------------------------------------------------------- /src/testSys/fan/Facets.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2010, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 3 Feb 10 Brian Frank Creation 7 | // 8 | 9 | @Js facet class FacetM1 {} 10 | @Js facet class FacetM2 {} 11 | 12 | @Js facet class FacetS1 13 | { 14 | const Str val := "alpha" 15 | } 16 | 17 | @Js facet class FacetS2 18 | { 19 | const Bool b 20 | const Int i 21 | const Str? s 22 | const Version? v 23 | const Int[]? l 24 | const Type? type 25 | const Slot? slot 26 | } -------------------------------------------------------------------------------- /src/graphics/fan/Paint.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2022, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 28 Feb 2022 Brian Frank Creation 7 | // 8 | 9 | ** 10 | ** Paint models the color, image, or pattern used to stroke or fill a shape. 11 | ** Currently there is only one implementation: `Color`. 12 | ** 13 | @Js 14 | const mixin Paint 15 | { 16 | ** Is this solid color paint 17 | abstract Bool isColorPaint() 18 | 19 | ** Return as solid Color 20 | abstract Color asColorPaint() 21 | } -------------------------------------------------------------------------------- /src/sys/dotnet/fan/sys/NoDoc.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2010, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 4 Feb 10 Brian Frank Creation 7 | // 8 | 9 | namespace Fan.Sys 10 | { 11 | public sealed class NoDoc : FanObj, Facet 12 | { 13 | public static readonly NoDoc m_defVal = new NoDoc(); 14 | 15 | private NoDoc() {} 16 | 17 | public override Type @typeof() { return Sys.NoDocType; } 18 | 19 | public override string toStr() { return @typeof().qname(); } 20 | } 21 | } -------------------------------------------------------------------------------- /src/sys/java/fanx/interop/DoubleArray.java: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2008, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 04 Dec 08 Brian Frank Creation 7 | // 8 | package fanx.interop; 9 | 10 | /** 11 | * DoubleArray dummy class for double[] 12 | */ 13 | public class DoubleArray 14 | { 15 | public static DoubleArray make(int size) { return null; } 16 | public double get(int index) { return 0; } 17 | public void set(int index, double val) {} 18 | public int size() { return 0; } 19 | } -------------------------------------------------------------------------------- /src/compilerJs/res/scriptRunnerTemplate.js: -------------------------------------------------------------------------------- 1 | //{{require}} 2 | 3 | try { 4 | //{{envDirs}} 5 | fan.{{tempPod}}.Main.main(); 6 | } catch (err) { 7 | console.log('ERROR: ' + err + '\n'); 8 | console.log(err.stack); 9 | if (err == undefined) print('Undefined error\n'); 10 | else if (err.trace) err.trace(); 11 | else 12 | { 13 | var file = err.fileName; if (file == null) file = 'Unknown'; 14 | var line = err.lineNumber; if (line == null) line = 'Unknown'; 15 | fan.sys.Env.cur().out().printLine(err + ' (' + file + ':' + line + ')\n'); 16 | } 17 | } -------------------------------------------------------------------------------- /src/doc/build.fan: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env fan 2 | // 3 | // Copyright (c) 2006, Brian Frank and Andy Frank 4 | // Licensed under the Academic Free License version 3.0 5 | // 6 | // History: 7 | // 1 Jan 07 Brian Frank Creation 8 | // 9 | 10 | using build 11 | 12 | ** 13 | ** doc/ 14 | ** 15 | class Build : BuildGroup 16 | { 17 | new make() 18 | { 19 | childrenScripts = 20 | [ 21 | `docIntro/build.fan`, 22 | `docLang/build.fan`, 23 | `docTools/build.fan`, 24 | `docFanr/build.fan`, 25 | `docDomkit/build.fan`, 26 | ] 27 | } 28 | } -------------------------------------------------------------------------------- /src/sys/fan/ParseErr.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2007, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 18 Aug 07 Brian Frank Creation 7 | // 8 | 9 | ** 10 | ** ParseErr indicates an invalid string format which cannot be parsed. 11 | ** It is often used with 'fromStr' and 'fromLocale' methods. 12 | ** 13 | const class ParseErr : Err 14 | { 15 | 16 | ** 17 | ** Construct with specified error message and optional root cause. 18 | ** 19 | new make(Str msg := "", Err? cause := null) 20 | 21 | } -------------------------------------------------------------------------------- /src/sys/dotnet/fanx/fcode/FDoc.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2008, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 18 Feb 08 Andy Frank Creation 7 | // 8 | 9 | using System.IO; 10 | using System.Text; 11 | using Fan.Sys; 12 | 13 | namespace Fanx.Fcode 14 | { 15 | public class FDoc 16 | { 17 | public static void read(Stream input, object top) 18 | { 19 | // TODO: this code needs to be updated to use new 20 | // apidoc format introduced in 1.0.60 Sept 2011 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /src/sys/es/fan/UriScheme.js: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2009, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 13 Jul 2023 Matthew Giannini Creation 7 | // 8 | 9 | /** 10 | * UriScheme 11 | */ 12 | class UriScheme extends Obj { 13 | constructor() { super(); } 14 | 15 | static find(scheme, checked=true) { 16 | if (checked) throw UnresolvedErr.make(`${scheme}`); 17 | return null; 18 | } 19 | 20 | get(uri, base) { 21 | throw UnresolvedErr.make(`uri=${uri} base=${base}`); 22 | } 23 | } -------------------------------------------------------------------------------- /src/sys/java/fanx/interop/BooleanArray.java: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2008, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 04 Dec 08 Brian Frank Creation 7 | // 8 | package fanx.interop; 9 | 10 | /** 11 | * BooleanArray dummy class for boolean[] 12 | */ 13 | public class BooleanArray 14 | { 15 | public static BooleanArray make(int size) { return null; } 16 | public boolean get(int index) { return false; } 17 | public void set(int index, boolean val) {} 18 | public int size() { return 0; } 19 | } -------------------------------------------------------------------------------- /src/math/fan/Math.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2020, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 11 Aug 20 Matthew Giannini Creation 7 | // 8 | 9 | 10 | ** 11 | ** This mixin contains a set of utilities and functions for various math operations. 12 | ** 13 | final class Math 14 | { 15 | ** Create a new `Matrix` with the given number of rows and columns. 16 | ** All elements of the matrix are initialized to zero. 17 | static Matrix matrix(Int numRows, Int numCols) { MMatrix(numRows, numCols) } 18 | } -------------------------------------------------------------------------------- /src/sys/dotnet/fan/sys/Operator.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2010, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 8 Nov 10 Brian Frank Creation 7 | // 8 | 9 | namespace Fan.Sys 10 | { 11 | public sealed class Operator : FanObj, Facet 12 | { 13 | public static readonly Operator m_defVal = new Operator(); 14 | 15 | private Operator() {} 16 | 17 | public override Type @typeof() { return Sys.OperatorType; } 18 | 19 | public override string toStr() { return @typeof().qname(); } 20 | } 21 | } -------------------------------------------------------------------------------- /src/sys/dotnet/fan/sys/Transient.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2010, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 4 Feb 10 Brian Frank Creation 7 | // 8 | 9 | namespace Fan.Sys 10 | { 11 | public sealed class Transient : FanObj, Facet 12 | { 13 | public static readonly Transient m_defVal = new Transient(); 14 | 15 | private Transient() {} 16 | 17 | public override Type @typeof() { return Sys.TransientType; } 18 | 19 | public override string toStr() { return @typeof().qname(); } 20 | } 21 | } -------------------------------------------------------------------------------- /src/sys/fan/UnknownFacetErr.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2009, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 14 May 09 Brian Frank Creation 7 | // 03 Feb 09 Brian Frank Rename from UnknownSymbolErr 8 | // 9 | 10 | ** 11 | ** UnknownFacetErr indicates an attempt to access an undefined facet. 12 | ** 13 | const class UnknownFacetErr : Err 14 | { 15 | 16 | ** 17 | ** Construct with specified error message and optional root cause. 18 | ** 19 | new make(Str msg := "", Err? cause := null) 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/sys/fan/NotImmutableErr.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2007, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 2 Feb 07 Brian Frank Creation 7 | // 8 | 9 | ** 10 | ** NotImmutableErr indicates using a mutable Obj where an immutable Obj is 11 | ** required. See Obj.isImmutable for the definition of immutability. 12 | ** 13 | const class NotImmutableErr : Err 14 | { 15 | 16 | ** 17 | ** Construct with specified error message and optional root cause. 18 | ** 19 | new make(Str msg := "", Err? cause := null) 20 | 21 | } -------------------------------------------------------------------------------- /src/math/test/BigIntTest.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2025, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 3 Jun 25 Brian Frank Creation 7 | // 8 | 9 | class BigIntTest : Test 10 | { 11 | Void testGetSet() 12 | { 13 | i := BigInt("123") 14 | verifyEq(i.typeof, BigInt#) 15 | 16 | verifyEq(BigInt.defVal, BigInt(0)) 17 | verifyEq(BigInt.zero, BigInt(0)) 18 | verifyEq(BigInt.one, BigInt(1)) 19 | 20 | verifyEq(i + 3, BigInt("126")) 21 | verifyEq(i - 3, BigInt("120")) 22 | } 23 | } 24 | 25 | -------------------------------------------------------------------------------- /etc/syntax/syntax-yaml.fog: -------------------------------------------------------------------------------- 1 | // 2 | // Syntax rules for YAML 3 | // 4 | // History: 5 | // 5 Mar 23 Brian Frank Creation 6 | // 7 | 8 | using syntax 9 | 10 | SyntaxRules 11 | { 12 | // bracket symbols 13 | brackets = "<>{}[]" 14 | 15 | // list of end of line comment tokens 16 | comments = ["#"] 17 | 18 | // string and character literals 19 | strs = 20 | [ 21 | SyntaxStr { delimiter = "\""; escape = '\\'; multiLine = false }, 22 | SyntaxStr { delimiter = "'"; escape = '\\'; multiLine = false }, 23 | ] 24 | 25 | // keyword list 26 | keywords = [,] 27 | } 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/fandoc/fan/FandocErr.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2008, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 19 May 08 Brian Frank Creation 7 | // 8 | 9 | ** 10 | ** FandocErr 11 | ** 12 | @Js 13 | const class FandocErr : Err 14 | { 15 | 16 | new make(Str msg, Str file, Int line, Err? cause := null) 17 | : super(msg, cause) 18 | { 19 | this.file = file 20 | this.line = line 21 | } 22 | 23 | override Str toStr() 24 | { 25 | return "$msg [$file:$line]" 26 | } 27 | 28 | const Str file 29 | const Int line 30 | } -------------------------------------------------------------------------------- /src/sys/java/fan/sys/NoDoc.java: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2010, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 4 Feb 10 Brian Frank Creation 7 | // 8 | package fan.sys; 9 | 10 | /** 11 | * Annotate a type or slot as undocumented. 12 | */ 13 | public final class NoDoc extends FanObj implements Facet 14 | { 15 | public static final NoDoc defVal = new NoDoc(); 16 | 17 | private NoDoc() {} 18 | 19 | public Type typeof() { return Sys.NoDocType; } 20 | 21 | public String toStr() { return typeof().qname(); } 22 | 23 | } 24 | 25 | -------------------------------------------------------------------------------- /src/domkit/css/Popup.css: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2014, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 19 Dec 2014 Andy Frank Creation 7 | // 8 | 9 | div.domkit-Popup { 10 | position: absolute; 11 | outline: none; 12 | background: rgba(248, 248, 248, 0.95); 13 | border: 1px solid #ddd; 14 | box-shadow: 0px 9px 18px rgba(0, 0, 0, 0.25); 15 | box-sizing: border-box; 16 | } 17 | 18 | div.domkit-Popup-mask { 19 | position: absolute; 20 | top: 0; 21 | left: 0; 22 | width: 100%; 23 | height: 100%; 24 | z-index: 100; 25 | } -------------------------------------------------------------------------------- /src/sys/java/fan/sys/Js.java: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2010, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 4 Feb 10 Brian Frank Creation 7 | // 8 | package fan.sys; 9 | 10 | /** 11 | * Js is used to annoate types which should be compiled into JavaScript. 12 | */ 13 | public final class Js extends FanObj implements Facet 14 | { 15 | public static final Js defVal = new Js(); 16 | 17 | private Js() {} 18 | 19 | public Type typeof() { return Sys.JsType; } 20 | 21 | public String toStr() { return typeof().qname(); } 22 | 23 | } 24 | 25 | -------------------------------------------------------------------------------- /src/dom/es/WeakMapPeer.js: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2016, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 9 Mar 2016 Andy Frank Creation 7 | // 10 Jun 2023 Kiera O'Flynn Refactor to ES 8 | // 9 | 10 | class WeakMapPeer extends sys.Obj { 11 | 12 | constructor(self) { super(); this.map = new js.WeakMap(); } 13 | has(self, key) { return this.map.has(key); } 14 | get(self, key) { return this.map.get(key); } 15 | set(self, key, val) { this.map.set(key, val); return self; } 16 | delete(self, key) { return this.map.delete(key); } 17 | 18 | } -------------------------------------------------------------------------------- /src/sys/fan/UnknownServiceErr.fan: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2009, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 21 Dec 07 Brian Frank Creation 7 | // 26 Mar 09 Brian Frank Renamed from UnknownThreadErr 8 | // 9 | 10 | ** 11 | ** UnknownServiceErr indicates an attempt to lookup a service 12 | ** which is not installed. See `Service.find`. 13 | ** 14 | const class UnknownServiceErr : Err 15 | { 16 | 17 | ** 18 | ** Construct with specified error message and optional root cause. 19 | ** 20 | new make(Str msg := "", Err? cause := null) 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/sys/java/fan/sys/Operator.java: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2010, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 8 Nov 10 Brian Frank Creation 7 | // 8 | package fan.sys; 9 | 10 | /** 11 | * Used on methods to indicate method may be used as an operator. 12 | */ 13 | public final class Operator extends FanObj implements Facet 14 | { 15 | public static final Operator defVal = new Operator(); 16 | 17 | private Operator() {} 18 | 19 | public Type typeof() { return Sys.OperatorType; } 20 | 21 | public String toStr() { return typeof().qname(); } 22 | 23 | } 24 | 25 | -------------------------------------------------------------------------------- /src/sys/java/fan/sys/Transient.java: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2010, Brian Frank and Andy Frank 3 | // Licensed under the Academic Free License version 3.0 4 | // 5 | // History: 6 | // 4 Feb 10 Brian Frank Creation 7 | // 8 | package fan.sys; 9 | 10 | /** 11 | * Transient annotates fields which should not be serialized. 12 | */ 13 | public final class Transient extends FanObj implements Facet 14 | { 15 | public static final Transient defVal = new Transient(); 16 | 17 | private Transient() {} 18 | 19 | public Type typeof() { return Sys.TransientType; } 20 | 21 | public String toStr() { return typeof().qname(); } 22 | 23 | } 24 | 25 | -------------------------------------------------------------------------------- /examples/web/demo/index.html: -------------------------------------------------------------------------------- 1 | 2 | Wisp Demo Index 3 | 4 |

Wisp Demo Index

5 | 6 |