Add reference

This commit is contained in:
2025-07-24 14:43:16 -05:00
parent 92f21917b1
commit 6a8c8f38ff
44 changed files with 2082 additions and 1287 deletions

View File

@@ -0,0 +1,5 @@
/^ Write Text To Standard Output ^/
func Console.WriteLine(text)
{
}

View File

@@ -0,0 +1,5 @@
/^ Get Documents Folder ^/
func Env.getDocuments()
{
}

View File

@@ -0,0 +1,10 @@
/^ Read string contents from file ^/
func FS.ReadAllText(filesystem, path)
{
}
/^ Write string contents to file ^/
func FS.WriteAllText(filesystem, path, contents)
{
}

View File

@@ -0,0 +1,16 @@
/^
Decode JSON String to Object
^/
func Json.Decode(text)
{
}
/^
Encode Object to JSON String
pretty: true: make pretty, false: compact
^/
func Json.Encode(obj, $pretty)
{
}

View File

@@ -0,0 +1,71 @@
/^ A list created by using the [] expression ^/
class List : HeapObject {
/^ Returns an Enumerator for the each statement ^/
public GetEnumerator()
{
}
/^ Serializes to JSON ^/
public ToString()
{
}
/^ Insert an item at index ^/
public Insert(index, value)
{
}
/^ Add an item ^/
public Add(item)
{
}
/^ Returns whether the list contains the item ^/
public Contains(item)
{
}
/^ Gets the index of the item (optionally starting at an index) returns -1 if not found ^/
public IndexOf(item, $index)
{
}
/^ Removes all items that are the same value ^/
public RemoveAllEqual(item)
{
}
/^ Removes item at index ^/
public RemoveAt(index)
{
}
/^ Removes all items ^/
public Clear()
{
}
/^ Gets the item at index, also can use array subscript sugar ^/
public GetAt(index)
{
}
/^ Sets the item at index to value, also can use array subscript sugar ^/
public SetAt(index, value)
{
}
/^ Gets the nunber of items ^/
public Count()
{
}
/^ Gets the nunber of items ^/
public Length()
{
}
}

View File

@@ -0,0 +1,24 @@
class Mutex : HeapObject
{
/^ Create the mutex ^/
public Mutex()
{
}
/^ Lock the mutex ^/
public Lock()
{
}
/^ Unlock the mutex ^/
public Unlock()
{
}
/^ Try to lock the mutex ^/
public TryLock()
{
}
}

View File

@@ -0,0 +1,17 @@
/^ Base Object ^/
class Object {
/^ Serializes object to String ^/
public abstract ToString();
}
/^ All garbage collected objects inherit from me ^/
class HeapObject : Object {
}
/^ All CrossLang classes inherit from me ^/
class ClassObject : HeapObject {
}
/^ A non typesafe native object ^/
class Native : HeapObject {
}

View File

@@ -0,0 +1,74 @@
/^ base class for stream ^/
class Stream : HeapObject {
/^ Can Read be called ^/
public getCanRead()
{
}
/^ Can Write be called ^/
public getCanWrite()
{
}
/^ Can Seek be called ^/
public getCanSeek()
{
}
/^ Read bytes from stream into buffer ^/
public Read(buffer, offset, length)
{
}
/^ Write bytes to stream from buffer ^/
public Write(buffer, offset, length)
{
}
/^ Read bytes from stream into buffer, reading multiple times if needed ^/
public ReadBlock(buffer, offset, length)
{
}
/^ Write bytes to stream from buffer and ensuring that number of bytes is actually writen ^/
public WriteBlock(buffer, offset, length)
{
}
/^ Write text to stream ^/
public WriteText(text)
{
}
/^ Copy to another stream ^/
public CopyTo(stream,$bufferSize)
{
}
/^
Seek to position
whence:
Stream.Begin: 0
Stream.Current: 1
Stream.End: 2
^/
public Seek(pos, whence)
{
}
/^ Flush to disk ^/
public Flush()
{
}
/^ Close the stream ^/
public Close()
{
}
}

View File

@@ -0,0 +1,18 @@
/^
The String Type
To Concat a String use the + operator
^/
class String : Object {
/^ Search and replace all ^/
public Replace(oldStr, newStr)
{
}
/^ Return a copy of the string ^/
public ToString()
{
}
}