Index

lognestmonster / 4e8c05e

A general-purpose single-header C logging library and parser for event-based logs. (Incomplete)

Latest Commit

{#}TimeHashSubjectAuthor#(+)(-)GPG?
1325 Dec 2018 19:589e9db4cCreate event.jsJoshua1200N

Blob @ lognestmonster / src / event.js

application/javascript658 bytesdownload raw
1const statement = require("./statement.js");
2
3class Event {
4 constructor() {
5 if (arguments.length == 0) this.statementsVar = [];
6 if (arguments.length == 1) this.statementsVar = [arguments[0]];
7 if (arguments.length == 3) this.statementsVar = [new statement(arguments[0], arguments[1], arguments[2])];
8 }
9
10 get statements() {return this.statementsVar}
11 set statements(statements) {this.statementsVar = statements}
12
13 push() {
14 if (arguments.length == 1) this.statements.push(arguments[0].statements);
15 if (arguments.length == 3) this.statements.push(new statement(arguments[0], arguments[1], arguments[2]));
16 return this;
17 }
18}
19
20module.exports = Event;
21