Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
limuy2022 committed Jan 10, 2024
2 parents b94d330 + ed20645 commit a7d395d
Show file tree
Hide file tree
Showing 17 changed files with 201 additions and 304 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ rules.ninja
compile_commands.json
#clangd缓存
.cache/
lib/

#for rust
target/
Expand Down
22 changes: 1 addition & 21 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,6 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror")
add_subdirectory("cmake_third_party/googletest")
include_directories("cmake_third_party/googletest/googletest/include", "include")

add_library(language_module)
target_sources(language_module
PUBLIC
FILE_SET CXX_MODULES FILES
language/language.cppm
)

message("${LANGUAGE_SOURCES}")

add_library(Chinese language/chinese.cpp)

add_library(English language/english.cpp)

add_library(language language/english.cpp)

target_link_libraries(Chinese language_module)
target_link_libraries(English language_module)
target_link_libraries(language language_module)

file(GLOB_RECURSE CPPMSOURCES "*.cppm")
file(GLOB_RECURSE CPP_SOURCES "src/*.cpp")

Expand All @@ -50,7 +31,6 @@ target_sources(foo
add_executable(Trc ${CPP_SOURCES})

target_link_libraries(Trc foo)
target_link_libraries(Trc language)


file(GLOB_RECURSE TEST_SOURCES "tests/unittest/*.cpp")
Expand All @@ -69,7 +49,7 @@ add_executable(unittest
${TEST_SOURCES}
)
target_compile_definitions(unittest PRIVATE "UNITTEST")
target_link_libraries(unittest testmodulefiles language gtest)
target_link_libraries(unittest testmodulefiles gtest)
add_dependencies(Trc flex bison)
add_dependencies(unittest flex bison)

Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ Using c++ 20 standard and use module feature

But here is a developing ```rust``` instance now!

in directory ```rust```
[rust_trc](rust/)

## Goal

#### as easy as Python
**as easy as Python**

#### as fast as Java
**as fast as Java**

#### as small as lua
**as small as lua**

## project website

Expand All @@ -43,13 +43,13 @@ trc support many languages,the way to change language is that uses the languag

### hello world

```
```go
println("hello world!")
```

### calculate even numbers from 1 to n

```
```go
a := int(input())
while a > 0 {
if a %2 == 0{
Expand All @@ -61,7 +61,7 @@ while a > 0 {

### Big num calculation

```
```go
a := 1231234561234
b := a
println(a)
Expand All @@ -85,6 +85,6 @@ QQ:3570249647

| Library |Usage |
|:-----------|:-------|
| googletest | Uniitest |
| googletest | Unittest |

Express my thanks to Open-source software contributors!
File renamed without changes.
File renamed without changes.
81 changes: 0 additions & 81 deletions language/chinese.cpp

This file was deleted.

90 changes: 0 additions & 90 deletions language/english.cpp

This file was deleted.

72 changes: 0 additions & 72 deletions language/language.cppm

This file was deleted.

12 changes: 0 additions & 12 deletions language/xmake.lua

This file was deleted.

Loading

0 comments on commit a7d395d

Please sign in to comment.