-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new line checks everywhere (#55)
* add check for new lines * comments ordering, update tests * abstract class parse * abstract class impl
- Loading branch information
Kiyomi H
committed
Oct 14, 2019
1 parent
e971752
commit efef541
Showing
18 changed files
with
100 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { expect } from "chai"; | ||
import {DirDecl} from "../../src/ast/DirDecl"; | ||
import {Tokenizer} from "../../src/util/Tokenizer"; | ||
import {ClassDecl} from "../../src/ast/ClassDecl"; | ||
|
||
describe("DirDecl parse test", () => { | ||
|
||
const DUMMY_ROOT_DIR: string = "."; | ||
|
||
it("parses dir with abstract class inside", () => { | ||
let tokenizer : Tokenizer = new Tokenizer("dirDeclWithAbstractClass.txt", "./test/testFiles"); | ||
let dirDec : DirDecl = new DirDecl(DUMMY_ROOT_DIR); | ||
dirDec.parse(tokenizer); | ||
expect(dirDec.contents).to.have.length(1); | ||
let classDec = dirDec.contents[0] as ClassDecl; | ||
expect(classDec.isAbstract).to.be.true; | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
abstract class Time extends TimeClass | ||
comments [ "This is the time class" ] | ||
fields private [ number dayOfWeek, number hour, number minute ] | ||
generate getters | ||
generate setters | ||
fields public [ number date ] | ||
generate getters | ||
function public formatDate | ||
returns string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
dir models | ||
abstract class Time implements ITime, DateTime extends TimeClass | ||
comments [ "This is the time class" ] | ||
fields private [ number dayOfWeek, number hour, number minute ] | ||
generate getters | ||
generate setters | ||
fields public [ number date ] | ||
generate getters | ||
function public getDate | ||
returns string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
function public static async addDataset | ||
params [ string id, string content, InsightDatasetKind kind ] | ||
comments [ "Add Dataset function", "returns ids of datasets on disk" ] | ||
params [ string id, string content, InsightDatasetKind kind ] | ||
returns Promise<string> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
function public getTime returns number | ||
function public getTime | ||
returns number |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
function private foo returns NOTAVALIDTYPE | ||
function private foo | ||
returns NOTAVALIDTYPE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
function private foo | ||
params [ ] | ||
comments [ "ayy lmao" ] | ||
params [ ] | ||
returns number |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
interface TransitLine | ||
function public getNumberOfStops | ||
params [ ] | ||
comments [ "Returns the number of stops in the transit line" ] | ||
params [ ] | ||
returns number | ||
function getRoute | ||
params [ ] | ||
comments [ "Returns the street names of transit route" ] | ||
params [ ] | ||
returns string |