Skip to content

Commit

Permalink
Merge branch 'vardec_varass_dependency' into feature/operator_precedence
Browse files Browse the repository at this point in the history
  • Loading branch information
deavmi committed May 5, 2024
2 parents 3dddbc0 + 5f81ac4 commit 8561cdb
Show file tree
Hide file tree
Showing 51 changed files with 5,736 additions and 1,200 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/d.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ jobs:
# mv doveralls_linux_travis doveralls
# chmod +x doveralls
dub fetch doveralls
# Thank you Indian fella, you receive 1 satoshi (https://github.com/orgs/community/discussions/120966#discussioncomment-9211925)
sudo rm /etc/apt/sources.list.d/microsoft-prod.list
sudo apt update
sudo apt install libcurl4-openssl-dev
Expand Down Expand Up @@ -382,6 +386,11 @@ jobs:
else
exit 1
fi

- name: Unused variables check (positive case)
run: ./tlang typecheck source/tlang/testing/unused_vars.t --unusedVars true
- name: Unused variables check (negative case)
run: ./tlang typecheck source/tlang/testing/unused_vars_none.t --unusedVars true

emit:
needs: [build, unittests]
Expand Down Expand Up @@ -515,6 +524,24 @@ jobs:
./tlang compile source/tlang/testing/simple_pointer_array_syntax.t
./tlang.out
- name: Multi-module test that returns 45
run: |
set -e
./tlang compile source/tlang/testing/modules/a.t
set +e
./tlang.out
if [ $? = 45 ]
then
set -e
exit 0
else
set -e
exit 1
fi
##################################
Expand Down
11 changes: 8 additions & 3 deletions dub.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,16 @@
],
"copyright": "Copyright © 2021-2023, Tristan B. Kildaire",
"dependencies": {
"gogga": "~>0.1.0",
"jcli": "0.25.0-beta.3"
"gogga": ">=3.1.1",
"jcli": "0.25.0-beta.3",
"niknaks": ">=0.9.8"
},
"description": "The official Tristan language compiler project",
"homepage": "http://deavmi.assigned.network/projects/tlang",
"license": "GPLv3",
"name": "tlang",
"homepage": "http://deavmi.assigned.network/projects/tlang"
"versions": [
"DBG_MODMAN",
"DBG_DEBUG_LOGGING"
]
}
2 changes: 1 addition & 1 deletion extern_test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#1/bin/sh
#!/bin/sh

# Compile C to object file as library to link in
gcc source/tlang/testing/file_io.c -c -o file_io.o
Expand Down
13 changes: 13 additions & 0 deletions scratch/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
library:
gcc -c library.c -o library.o

clean:
rm library.o
rm main.o
rm main

main:
gcc -c main.c library.o -o main.o

exec:
gcc main.o library.o -o main
4 changes: 4 additions & 0 deletions scratch/library.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
int myFunc(int x)
{
return x*4;
}
9 changes: 9 additions & 0 deletions scratch/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
extern int myFunc(int);

#include<stdio.h>

int main()
{
int result = myFunc(4);
printf("myFunc(4): %d\n", result);
}
Loading

0 comments on commit 8561cdb

Please sign in to comment.