-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
65 changed files
with
15,076 additions
and
254 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
*.out | ||
*.out.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
uint8_t stuff { | ||
/** | ||
* Something. | ||
*/ | ||
static get(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
uint8_t stuff { | ||
|
||
/** | ||
* Something. | ||
*/ | ||
static get(); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
(ApiAst.Api (None, | ||
[(ApiAst.Decl_GetSet ((ApiAst.Ty_LName uint8_t), stuff, | ||
[(ApiAst.Decl_Comment ( | ||
(ApiAst.Cmt_Doc | ||
[ApiAst.Cmtf_Break; (ApiAst.Cmtf_Doc " Something.")]), | ||
(ApiAst.Decl_Static | ||
(ApiAst.Decl_Function (ApiAst.Ty_Auto, get, [], ApiAst.Err_None | ||
))) | ||
)) | ||
] | ||
)) | ||
], | ||
None)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Fatal error: exception Failure("(ApiAst.Decl_Static\n (ApiAst.Decl_Function (ApiAst.Ty_Auto, get, [], ApiAst.Err_None)))") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Fatal error: exception Failure("cannot infer types for decl: (ApiAst.Decl_Static\n (ApiAst.Decl_Function (ApiAst.Ty_Auto, get, [], ApiAst.Err_None)))") |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
|
||
namespace toxav { | ||
|
||
/** | ||
* The call state is a set of operations that are currently being performed. | ||
* A value of 0 means we are neither sending nor receiving anything, meaning, | ||
* one of the sides requested pause. The call will be resumed once the side | ||
* that initiated pause resumes it. | ||
*/ | ||
enum CALL_STATE { | ||
|
||
/** | ||
* The friend is sending audio (we are receiving). | ||
*/ | ||
SENDING_A, | ||
|
||
/** | ||
* The friend is sending video (we are receiving). | ||
*/ | ||
SENDING_V, | ||
|
||
/** | ||
* The friend is receiving audio (we are sending). | ||
*/ | ||
RECEIVING_A, | ||
|
||
/** | ||
* The friend is receiving video (we are sending). | ||
*/ | ||
RECEIVING_V, | ||
|
||
/** | ||
* The call has finished. This is the final state after which no more state | ||
* transitions can occur for the call. | ||
*/ | ||
END, | ||
|
||
/** | ||
* Set by the AV core if an error occurred on the remote end. This call | ||
* state will never be triggered in combination with other call states. | ||
*/ | ||
ERROR, | ||
|
||
} | ||
|
||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
(ApiAst.Api (None, | ||
[(ApiAst.Decl_Namespace (toxav, | ||
[(ApiAst.Decl_Comment ( | ||
(ApiAst.Cmt_Doc | ||
[ApiAst.Cmtf_Break; | ||
(ApiAst.Cmtf_Doc | ||
" The call state is a set of operations that are currently being performed."); | ||
ApiAst.Cmtf_Break; | ||
(ApiAst.Cmtf_Doc | ||
" A value of 0 means we are neither sending nor receiving anything, meaning,"); | ||
ApiAst.Cmtf_Break; | ||
(ApiAst.Cmtf_Doc | ||
" one of the sides requested pause. The call will be resumed once the side"); | ||
ApiAst.Cmtf_Break; | ||
(ApiAst.Cmtf_Doc " that initiated pause resumes it.")]), | ||
(ApiAst.Decl_Enum (ApiAst.Enum_Bitmask, CALL_STATE, | ||
[(ApiAst.Enum_Name ( | ||
(ApiAst.Cmt_Doc | ||
[ApiAst.Cmtf_Break; | ||
(ApiAst.Cmtf_Doc | ||
" The friend is sending audio (we are receiving).") | ||
]), | ||
SENDING_A, None)); | ||
(ApiAst.Enum_Name ( | ||
(ApiAst.Cmt_Doc | ||
[ApiAst.Cmtf_Break; | ||
(ApiAst.Cmtf_Doc | ||
" The friend is sending video (we are receiving).") | ||
]), | ||
SENDING_V, None)); | ||
(ApiAst.Enum_Name ( | ||
(ApiAst.Cmt_Doc | ||
[ApiAst.Cmtf_Break; | ||
(ApiAst.Cmtf_Doc | ||
" The friend is receiving audio (we are sending).") | ||
]), | ||
RECEIVING_A, None)); | ||
(ApiAst.Enum_Name ( | ||
(ApiAst.Cmt_Doc | ||
[ApiAst.Cmtf_Break; | ||
(ApiAst.Cmtf_Doc | ||
" The friend is receiving video (we are sending).") | ||
]), | ||
RECEIVING_V, None)); | ||
(ApiAst.Enum_Name ( | ||
(ApiAst.Cmt_Doc | ||
[ApiAst.Cmtf_Break; | ||
(ApiAst.Cmtf_Doc | ||
" The call has finished. This is the final state after which no more state"); | ||
ApiAst.Cmtf_Break; | ||
(ApiAst.Cmtf_Doc | ||
" transitions can occur for the call.") | ||
]), | ||
END, None)); | ||
(ApiAst.Enum_Name ( | ||
(ApiAst.Cmt_Doc | ||
[ApiAst.Cmtf_Break; | ||
(ApiAst.Cmtf_Doc | ||
" Set by the AV core if an error occurred on the remote end. This call"); | ||
ApiAst.Cmtf_Break; | ||
(ApiAst.Cmtf_Doc | ||
" state will never be triggered in combination with other call states.") | ||
]), | ||
ERROR, None)) | ||
] | ||
)) | ||
)) | ||
] | ||
)) | ||
], | ||
None)) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
module Main where | ||
|
||
import Data.Int (Int16, Int32, Int64, Int8) | ||
import Data.Word (Word16, Word32, Word64, Word8) | ||
import Foreign.C.String (CString, withCString) | ||
import Foreign.C.Types (CInt (..), CSize (..)) | ||
import Foreign.Ptr (FunPtr, Ptr) | ||
|
||
-- | | ||
-- The call state is a set of operations that are currently being performed. | ||
-- A value of 0 means we are neither sending nor receiving anything, meaning, | ||
-- one of the sides requested pause. The call will be resumed once the side | ||
-- that initiated pause resumes it. | ||
data TOXAV_CALL_STATE | ||
|
||
= TOXAV_CALL_STATE_SENDING_A = 1 | ||
-- ^ | ||
-- The friend is sending audio (we are receiving). | ||
|
||
| TOXAV_CALL_STATE_SENDING_V = 2 | ||
-- ^ | ||
-- The friend is sending video (we are receiving). | ||
|
||
| TOXAV_CALL_STATE_RECEIVING_A = 4 | ||
-- ^ | ||
-- The friend is receiving audio (we are sending). | ||
|
||
| TOXAV_CALL_STATE_RECEIVING_V = 8 | ||
-- ^ | ||
-- The friend is receiving video (we are sending). | ||
|
||
| TOXAV_CALL_STATE_END = 16 | ||
-- ^ | ||
-- The call has finished. This is the final state after which no more state | ||
-- transitions can occur for the call. | ||
|
||
| TOXAV_CALL_STATE_ERROR = 32 | ||
-- ^ | ||
-- Set by the AV core if an error occurred on the remote end. This call | ||
-- state will never be triggered in combination with other call states. | ||
deriving (Eq, Ord, Enum, Bounded, Read, Show) |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Fatal error: exception Failure("tests/class_number.api.h:1:7: error at NUMBER 3") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Fatal error: exception Failure("tests/class_number.api.h:1:7: error at NUMBER 3") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Fatal error: exception Failure("tests/class_number.api.h:1:7: error at NUMBER 3") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Fatal error: exception Failure("tests/class_number.api.h:1:7: error at NUMBER 3") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
int32_t x; | ||
int32_t x; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
int32_t x; | ||
|
||
|
||
int32_t x; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
(ApiAst.Api (None, | ||
[(ApiAst.Decl_Member ((ApiAst.Ty_LName int32_t), x)); | ||
(ApiAst.Decl_Member ((ApiAst.Ty_LName int32_t), x))], | ||
None)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Fatal error: exception Failure("duplicate name: x") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Fatal error: exception Failure("duplicate name: x") |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Fatal error: exception Failure("tests/empty.api.h:1:1: error at EOF") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Fatal error: exception Failure("tests/empty.api.h:1:1: error at EOF") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Fatal error: exception Failure("tests/empty.api.h:1:1: error at EOF") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Fatal error: exception Failure("tests/empty.api.h:1:1: error at EOF") |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
|
||
class fooBar { | ||
|
||
struct this; | ||
|
||
event thing { | ||
|
||
/** | ||
* yoy | ||
*/ | ||
typedef void cb(); | ||
|
||
} | ||
|
||
|
||
namespace bleh { | ||
|
||
event thing { | ||
|
||
/** | ||
* yoy | ||
*/ | ||
typedef void cb(); | ||
|
||
} | ||
|
||
|
||
event otherthing const { | ||
|
||
/** | ||
* Heyo haha. | ||
*/ | ||
typedef `a cb(uint32_t fluff); | ||
|
||
} | ||
|
||
} | ||
|
||
|
||
`a iterate(`a user_data); | ||
|
||
`any iterate2(`any user_data); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
(ApiAst.Api (None, | ||
[(ApiAst.Decl_Class (fooBar, | ||
[(ApiAst.Decl_Struct (this, [], [])); | ||
(ApiAst.Decl_Event (thing, false, | ||
[(ApiAst.Decl_Comment ( | ||
(ApiAst.Cmt_Doc [ApiAst.Cmtf_Break; (ApiAst.Cmtf_Doc " yoy")]), | ||
(ApiAst.Decl_Typedef ((ApiAst.Ty_LName void), cb, [])))) | ||
] | ||
)); | ||
(ApiAst.Decl_Namespace (bleh, | ||
[(ApiAst.Decl_Event (thing, false, | ||
[(ApiAst.Decl_Comment ( | ||
(ApiAst.Cmt_Doc | ||
[ApiAst.Cmtf_Break; (ApiAst.Cmtf_Doc " yoy")]), | ||
(ApiAst.Decl_Typedef ((ApiAst.Ty_LName void), cb, [])))) | ||
] | ||
)); | ||
(ApiAst.Decl_Event (otherthing, true, | ||
[(ApiAst.Decl_Comment ( | ||
(ApiAst.Cmt_Doc | ||
[ApiAst.Cmtf_Break; (ApiAst.Cmtf_Doc " Heyo haha.")]), | ||
(ApiAst.Decl_Typedef ((ApiAst.Ty_TVar a), cb, | ||
[(ApiAst.Param ((ApiAst.Ty_LName uint32_t), fluff))] | ||
)) | ||
)) | ||
] | ||
)) | ||
] | ||
)); | ||
(ApiAst.Decl_Function ((ApiAst.Ty_TVar a), iterate, | ||
[(ApiAst.Param ((ApiAst.Ty_TVar a), user_data))], ApiAst.Err_None | ||
)); | ||
(ApiAst.Decl_Function ((ApiAst.Ty_TVar any), iterate2, | ||
[(ApiAst.Param ((ApiAst.Ty_TVar any), user_data))], | ||
ApiAst.Err_None)) | ||
] | ||
)) | ||
], | ||
None)) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
module Main where | ||
|
||
import Data.Int (Int16, Int32, Int64, Int8) | ||
import Data.Word (Word16, Word32, Word64, Word8) | ||
import Foreign.C.String (CString, withCString) | ||
import Foreign.C.Types (CInt (..), CSize (..)) | ||
import Foreign.Ptr (FunPtr, Ptr) | ||
|
||
|
||
--struct FooBar | ||
-- | | ||
-- yoy | ||
--typedef foobar_thing_cb = {- bar :: -} Ptr FooBar -> {- user_data :: -} Ptr () -> () | ||
|
||
-- | | ||
-- Set the callback for the `${thing}` event. Pass NULL to unset. | ||
-- | ||
--foreign import ccall foobar_callback_thing :: {- bar :: -} Ptr FooBar -> {- callback :: -} Ptr foobar_thing_cb -> {- user_data :: -} Ptr () -> {- result :: -} () | ||
-- | | ||
-- yoy | ||
--typedef foobar_bleh_thing_cb = {- bar :: -} Ptr FooBar -> {- user_data :: -} Ptr () -> () | ||
|
||
-- | | ||
-- Set the callback for the `${bleh_thing}` event. Pass NULL to unset. | ||
-- | ||
--foreign import ccall foobar_callback_bleh_thing :: {- bar :: -} Ptr FooBar -> {- callback :: -} Ptr foobar_bleh_thing_cb -> {- user_data :: -} Ptr () -> {- result :: -} () | ||
-- | | ||
-- Heyo haha. | ||
--typedef foobar_bleh_otherthing_cb = {- bar :: -} Ptr FooBar -> {- fluff :: -} Word32 -> {- user_data :: -} Ptr () -> <unresolved> | ||
|
||
-- | | ||
-- Set the callback for the `${bleh_otherthing}` event. Pass NULL to unset. | ||
-- | ||
--foreign import ccall foobar_callback_bleh_otherthing :: {- bar :: -} Ptr FooBar -> {- callback :: -} Ptr foobar_bleh_otherthing_cb -> {- result :: -} () | ||
|
||
--foreign import ccall foobar_iterate :: {- bar :: -} Ptr FooBar -> {- user_data :: -} <unresolved> -> {- result :: -} <unresolved> | ||
|
||
--foreign import ccall foobar_iterate2 :: {- bar :: -} Ptr FooBar -> {- user_data :: -} <unresolved> -> {- result :: -} <unresolved> |
Oops, something went wrong.