-
Notifications
You must be signed in to change notification settings - Fork 737
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from fearthecowboy/master
Progress on LLC#
- Loading branch information
Showing
71 changed files
with
1,487 additions
and
658 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { Method } from "./method"; | ||
import { docComment, EOL, CommaChar, indent } from "#common/text-manipulation"; | ||
import { Class } from "./class"; | ||
|
||
export class Constructor extends Method { | ||
constructor(protected containingClass: Class, objectIntializer?: Partial<Method>) { | ||
super(containingClass.name); | ||
this.apply(objectIntializer); | ||
} | ||
|
||
public get declaration(): string { | ||
const parameterDeclaration = this.parameters.joinWith(p => p.declaration, CommaChar); | ||
|
||
return ` | ||
${this.summaryDocumentation} | ||
${this.parameterDocumentation} | ||
${this.accessModifier} ${this.name}(${parameterDeclaration}) | ||
`.trim(); | ||
} | ||
} |
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 { EOL } from "#common/text-manipulation"; | ||
|
||
export const summary = (text: string): string => xmlize("summary", text); | ||
|
||
|
||
export function xmlize(element: string, text: string): string { | ||
if (text) { | ||
if (text.length < 80 && text.indexOf(EOL) === -1) { | ||
return `<${element}>${text.trim()}</${element}>`; | ||
} | ||
return ` | ||
<${element}> | ||
${text} | ||
</${element}> | ||
`.trim(); | ||
} | ||
return text; | ||
} |
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,3 +1,10 @@ | ||
export interface Expression { | ||
value: string; | ||
} | ||
|
||
export class StringExpression implements Expression { | ||
public value: string; | ||
constructor(value: string) { | ||
this.value = `@"${value.replace(/"/g, '""')}"`; | ||
} | ||
} |
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,12 @@ | ||
export class Initializer { | ||
|
||
protected apply<T>(initializer?: Partial<T>) { | ||
if (initializer) { | ||
for (const i in (<any>initializer)) { | ||
//if ((<any>initializer)[i]) { | ||
(<any>this)[i] = (<any>initializer)[i] | ||
//}; | ||
} | ||
} | ||
} | ||
} |
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
Oops, something went wrong.