Last active
January 7, 2018 16:10
-
-
Save aziis98/678043c3cac413328c0b40cd9e957cf9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| #include "stdio.h" | |
| typedef char *string; | |
| typedef struct node { | |
| void *value; | |
| struct node *next; | |
| } Element; | |
| typedef Element *List; | |
| typedef enum { | |
| MlangType_Expression, | |
| MlangType_Integer, | |
| MlangType_Char, | |
| MlangType_String, | |
| MlangType_Symbol | |
| } MlangType; | |
| typedef struct { | |
| String name; | |
| Element *params; | |
| } MlangExpression; | |
| typedef struct { | |
| MlangType type; | |
| void * value; | |
| } MlangValue; | |
| void getline(string *s, int *size); | |
| int main(void) { | |
| while (1) { | |
| string str; | |
| int size; | |
| printf(" > "); | |
| getline(&str, &size); | |
| } | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment