Skip to content
Snippets Groups Projects
Commit 10b221b0 authored by David Sehnal's avatar David Sehnal
Browse files

tweaks

parent 4d2c7996
No related branches found
No related tags found
No related merge requests found
...@@ -5,9 +5,13 @@ ...@@ -5,9 +5,13 @@
*/ */
import * as fs from 'fs' import * as fs from 'fs'
import convert from './cif2bcif/converter' import convert from './converter'
(async function () { (async function () {
if (process.argv.length !== 4) {
console.log('Usage:\nnode cif2bcif input.cif output.bcif');
return;
}
const src = process.argv[2]; const src = process.argv[2];
const out = process.argv[3]; const out = process.argv[3];
......
...@@ -17,6 +17,7 @@ export function File(blocks: ArrayLike<Block>, name?: string): File { ...@@ -17,6 +17,7 @@ export function File(blocks: ArrayLike<Block>, name?: string): File {
export interface Frame { export interface Frame {
readonly header: string, readonly header: string,
// Category names stored separately so that the ordering can be preserved.
readonly categoryNames: ReadonlyArray<string>, readonly categoryNames: ReadonlyArray<string>,
readonly categories: Categories readonly categories: Categories
} }
...@@ -54,9 +55,8 @@ export namespace Category { ...@@ -54,9 +55,8 @@ export namespace Category {
/** /**
* Implementation note: * Implementation note:
* Always implement this as a "plain" object so that the functions are "closures" * Always implement without using "this." in any of the interface functions.
* by default. This is to ensure that the schema access works without definiting * This is to ensure that the functions can invoked without having to "bind" them.
* additional closures.
*/ */
export interface Field { export interface Field {
readonly '@array': ArrayLike<any> | undefined readonly '@array': ArrayLike<any> | undefined
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment