Skip to content

just-a-paw/preprocess

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Preprocessor

This library wraps the C++ preprocessor for easier use on any arbitrary code.

Examples

#define FAVOURITE_NUMBER 8
#define loop(n) for (let i; i < n; i++)

const arr = [];

loop(7) arr.push(i * 2);
loop(arr.length) console.log(FAVOURITE_NUMBER / arr[i]);
class Client {
#ifdef _WIN32
  public isDisconnected(server: Server) {
    return this.hasQuit() || !server.clients.find(this);
  }
#else
  public isDisconnected() {
    return this.hasQuit() || !this.fetchServer().isActive;
  }
#endif
}

About

Wrapper for arbitrary C++ preprocessing

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published