feat: Begin of LSP

This commit is contained in:
overflowerror 2024-02-22 18:34:01 +01:00
parent b14d745344
commit 38c41fa3f0
5 changed files with 98 additions and 0 deletions

59
lsp/.gitignore vendored Normal file
View file

@ -0,0 +1,59 @@
# Prerequisites
*.d
# Object files
*.o
*.ko
*.obj
*.elf
# Linker output
*.ilk
*.map
*.exp
# Precompiled Headers
*.gch
*.pch
# Libraries
*.lib
*.a
*.la
*.lo
# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib
# Executables
*.exe
#*.out
*.app
*.i*86
*.x86_64
*.hex
# Debug files
*.dSYM/
*.su
*.idb
*.pdb
# Kernel Module Compile Results
*.mod*
*.cmd
.tmp_versions/
modules.order
Module.symvers
Mkfile.old
dkms.conf
obj/ast.o
gen/**
build/**
macrofuck-lsp
*.swp

32
lsp/Makefile Normal file
View file

@ -0,0 +1,32 @@
CC = gcc
CFLAGS = -std=c11 -D_POSIX_C_SOURCE=200809L -Wall -Wpedantic -g -I./src -I./gen
LD = gcc
LDFLAGS =
YACC = bison
YFLAGS = -d
LEX = lex
LEXFLAGS =
OBJS = obj/main.o
DEPS = $(OBJS:%.o=%.d)
-include $(DEPS)
all: macrofuck-lsp
obj/%.o: src/%.c
$(CC) $(CFLAGS) -c -o $@ $<
macrofuck-lsp: $(OBJS)
$(LD) $(LDFLAGS) -o $@ $^
FORCE: ;
clean:
@echo "Cleaning up"
@rm -f obj/*.o
@rm -f obj/*.d
@rm -f gen/*.c
@rm -f gen/*.h
@rm macrofuck-lsp

0
lsp/gen/.gitignore vendored Normal file
View file

0
lsp/obj/.gitignore vendored Normal file
View file

7
lsp/src/main.c Normal file
View file

@ -0,0 +1,7 @@
#include <stdio.h>
int main(void) {
printf("Hello, World!\n");
return 0;
}