Zen-C
Loading...
Searching...
No Matches
zen_facts.h File Reference
#include "../zprep.h"
Include dependency graph for zen_facts.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  ZenTrigger {
  TRIGGER_GOTO , TRIGGER_POINTER_ARITH , TRIGGER_BITWISE , TRIGGER_RECURSION ,
  TRIGGER_TERNARY , TRIGGER_ASM , TRIGGER_WHILE_TRUE , TRIGGER_MACRO ,
  TRIGGER_VOID_PTR , TRIGGER_MAIN , TRIGGER_FORMAT_STRING , TRIGGER_STRUCT_PADDING ,
  TRIGGER_GLOBAL
}
 Triggers for Zen facts (easter egg system). More...
 

Functions

void zen_init (void)
 
int zen_trigger_at (ZenTrigger t, Token location)
 
void zen_trigger_global (void)
 
const char * zen_get_fact (ZenTrigger t)
 

Enumeration Type Documentation

◆ ZenTrigger

enum ZenTrigger

Triggers for Zen facts (easter egg system).

Each trigger corresponds to a specific coding pattern or event which may elicit a "Zen Fact" message to the user.

Enumerator
TRIGGER_GOTO 

Usage of goto.

TRIGGER_POINTER_ARITH 

Pointer arithmetic usage.

TRIGGER_BITWISE 

Bitwise operations.

TRIGGER_RECURSION 

Recursive calls (currently manual trigger).

TRIGGER_TERNARY 

Ternary operator usage.

TRIGGER_ASM 

Inline assembly.

TRIGGER_WHILE_TRUE 

while(true) loops.

TRIGGER_MACRO 

Macro definitions.

TRIGGER_VOID_PTR 

void* usage.

TRIGGER_MAIN 

Compilation of main function.

TRIGGER_FORMAT_STRING 

F-string usage.

TRIGGER_STRUCT_PADDING 

Implicit padding detection.

TRIGGER_GLOBAL 

Global variables.

Function Documentation

◆ zen_get_fact()

const char * zen_get_fact ( ZenTrigger  t)

◆ zen_init()

void zen_init ( void  )
Here is the caller graph for this function:

◆ zen_trigger_at()

int zen_trigger_at ( ZenTrigger  t,
Token  location 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ zen_trigger_global()

void zen_trigger_global ( void  )
Here is the call graph for this function:
Here is the caller graph for this function: