Compare commits
2 commits
b0525f2386
...
b00ab8e839
Author | SHA1 | Date | |
---|---|---|---|
b00ab8e839 | |||
0b816a512e |
2 changed files with 2 additions and 53 deletions
11
src/lang.zig
11
src/lang.zig
|
@ -3,11 +3,7 @@ const std = @import("std");
|
||||||
const plugin = @import("plugin.zig");
|
const plugin = @import("plugin.zig");
|
||||||
const custom = @import("custom.zig");
|
const custom = @import("custom.zig");
|
||||||
|
|
||||||
pub const ParseError = error{
|
pub const ParseError = error{ParseFail};
|
||||||
OutOfMemory,
|
|
||||||
ArgRequired,
|
|
||||||
ParseFail,
|
|
||||||
};
|
|
||||||
|
|
||||||
pub const CommandType = enum {
|
pub const CommandType = enum {
|
||||||
/// "LV2 Commands" are commands that receive split, index, and then receive
|
/// "LV2 Commands" are commands that receive split, index, and then receive
|
||||||
|
@ -481,9 +477,6 @@ pub const Command = struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const CommandList = std.ArrayList(*Command);
|
pub const CommandList = std.ArrayList(*Command);
|
||||||
pub const ArgList = std.ArrayList([]const u8);
|
|
||||||
|
|
||||||
pub const KeywordMap = std.StringHashMap(CommandType);
|
|
||||||
|
|
||||||
/// A parser.
|
/// A parser.
|
||||||
pub const Lang = struct {
|
pub const Lang = struct {
|
||||||
|
@ -653,8 +646,6 @@ pub const Lang = struct {
|
||||||
self.doError("Unknown command '{}' ({})", .{ command_string, command_string.len });
|
self.doError("Unknown command '{}' ({})", .{ command_string, command_string.len });
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// try cmds.append(cmd);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (self.has_error) return ParseError.ParseFail;
|
if (self.has_error) return ParseError.ParseFail;
|
||||||
|
|
|
@ -2,49 +2,7 @@ const langs = @import("lang.zig");
|
||||||
|
|
||||||
pub fn printList(list: langs.CommandList, stream: var) !void {
|
pub fn printList(list: langs.CommandList, stream: var) !void {
|
||||||
for (list.items) |cmd| {
|
for (list.items) |cmd| {
|
||||||
var command = switch (cmd.command) {
|
const command = @tagName(cmd.tag);
|
||||||
.Noop => "noop",
|
|
||||||
.Load => "load",
|
|
||||||
.Quicksave => "quicksave",
|
|
||||||
.RunQS => "runqs",
|
|
||||||
|
|
||||||
.Amp => "amp",
|
|
||||||
.RFlanger => "rflanger",
|
|
||||||
.Eq => "eq",
|
|
||||||
.Phaser => "phaser",
|
|
||||||
.Mbeq => "mbeq",
|
|
||||||
.Chorus => "chorus",
|
|
||||||
.PitchScaler => "pitchscaler",
|
|
||||||
.Reverb => "reverb",
|
|
||||||
.Highpass => "highpass",
|
|
||||||
.Delay => "delay",
|
|
||||||
.Vinyl => "vinyl",
|
|
||||||
.RevDelay => "revdelay",
|
|
||||||
.Gate => "gate",
|
|
||||||
.Detune => "detune",
|
|
||||||
.Overdrive => "overdrive",
|
|
||||||
.Degrade => "Degrade",
|
|
||||||
.RePsycho => "repsycho",
|
|
||||||
.TalkBox => "talkbox",
|
|
||||||
.DynComp => "dyncomp",
|
|
||||||
.ThruZero => "thruzero",
|
|
||||||
.Foverdrive => "foverdrive",
|
|
||||||
.Gverb => "gverb",
|
|
||||||
.Invert => "invert",
|
|
||||||
.TapeDelay => "tapedelay",
|
|
||||||
.ModDelay => "moddelay",
|
|
||||||
.MultiChorus => "multichorus",
|
|
||||||
.Saturator => "saturator",
|
|
||||||
.VintageDelay => "vintagedelay",
|
|
||||||
|
|
||||||
.Noise => "noise",
|
|
||||||
.WildNoise => "wildnoise",
|
|
||||||
.Write => "write",
|
|
||||||
.Embed => "embed",
|
|
||||||
|
|
||||||
.Rotate => "rotate",
|
|
||||||
};
|
|
||||||
|
|
||||||
try stream.print("{}", .{command});
|
try stream.print("{}", .{command});
|
||||||
|
|
||||||
for (cmd.args.items) |arg| {
|
for (cmd.args.items) |arg| {
|
||||||
|
|
Loading…
Reference in a new issue