From 5715d40eed34329e9c26da045a4e69ab38e04c86 Mon Sep 17 00:00:00 2001 From: servostar Date: Thu, 10 Oct 2024 12:00:14 +0200 Subject: [PATCH] feat: changed single line comment syntax from '#' to '//' --- lib/src/libc/bootstrap.gsc | 11 ++++++----- lib/src/libc/os.gsc | 2 +- lib/src/libc/types.gsc | 6 +++--- src/lex/lexer.l | 2 +- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/lib/src/libc/bootstrap.gsc b/lib/src/libc/bootstrap.gsc index 799f16b..2580d08 100644 --- a/lib/src/libc/bootstrap.gsc +++ b/lib/src/libc/bootstrap.gsc @@ -1,13 +1,14 @@ -# ---------------------------------------- -# Bootstrap module for libgscstd-glibc -# used on GNU/Linux operating systems +// ---------------------------------------- +// Bootstrap module for libgscstd-glibc +// used on GNU/Linux operating systems include "os" -# main function is to be implemented by the application source +// main function is to be implemented by the application source +#[nomangle] fun main() -# entrypoint function +// entrypoint function #[nomangle,noreturn,entry] fun _start() { main() diff --git a/lib/src/libc/os.gsc b/lib/src/libc/os.gsc index 954a374..d4225ee 100644 --- a/lib/src/libc/os.gsc +++ b/lib/src/libc/os.gsc @@ -1,7 +1,7 @@ include "types" -# from unistd.h +// from unistd.h #[nomangle,preserve,noreturn] fun _exit(in i32: code) diff --git a/lib/src/libc/types.gsc b/lib/src/libc/types.gsc index 30b8654..75f15c7 100644 --- a/lib/src/libc/types.gsc +++ b/lib/src/libc/types.gsc @@ -1,19 +1,19 @@ -# Signed integer types +// Signed integer types type signed half half int: i8 type signed half int: i16 type signed int: i32 type signed long int: i64 type signed long long int: i128 -# Unsigned integer types +// Unsigned integer types type unsigned half half int: u8 type unsigned half int: u16 type unsigned int: u32 type unsigned long int: u64 type unsigned long long int: u128 -# Floating point +// Floating point type half float: f16 type float: f32 type double float: f64 diff --git a/src/lex/lexer.l b/src/lex/lexer.l index 9f28ba3..8762224 100644 --- a/src/lex/lexer.l +++ b/src/lex/lexer.l @@ -28,7 +28,7 @@ %% "\n" yyLineNumber++; -#.* ; +//.* ; "::" {return(ModSep);}; ":" {DEBUG("\"%s\" tokenized with \':\'", yytext); return(':');};