type
stringclasses
7 values
content
stringlengths
4
9.55k
repo
stringlengths
7
96
path
stringlengths
4
178
language
stringclasses
1 value
ArrowFunction
(error: any) => { console.error(error); process.exit(0); }
98abhinav/angular2-seed
tools/tasks/seed/build.bundles.app.rollup.aot.ts
TypeScript
FunctionDeclaration
export default function Modal (props: ModalProps): React.ReactElement { const show = props.show const title = props.title || 'Oops!...' useEffect(() => { if (show) { document.body.style.overflow = 'hidden' } else { document.body.style.overflow = 'unset' } }, [show]) return ( <div ...
Dramakk/gra-w-smoka
views/helpers/Modal.tsx
TypeScript
ArrowFunction
() => { if (show) { document.body.style.overflow = 'hidden' } else { document.body.style.overflow = 'unset' } }
Dramakk/gra-w-smoka
views/helpers/Modal.tsx
TypeScript
ArrowFunction
(buttonDescription, index) => { return ( <button key={index} className={`button-${buttonDescription.buttonType}`}
Dramakk/gra-w-smoka
views/helpers/Modal.tsx
TypeScript
InterfaceDeclaration
export interface ButtonDescription { buttonType: 'danger' | 'primary' | 'success' | 'disabled' buttonText: string onClick: MouseEventHandler }
Dramakk/gra-w-smoka
views/helpers/Modal.tsx
TypeScript
InterfaceDeclaration
interface ModalProps { buttons: ButtonDescription[] show: boolean title?: string children: React.ReactNode }
Dramakk/gra-w-smoka
views/helpers/Modal.tsx
TypeScript
ArrowFunction
( fastify: FastifyInstance, opts: ServerOptions, next: CallableFunction, ) => { const { app, redis, maxProfiles, twitch, } = opts; const { urlPrefix } = app; fastify.register(db, { ...opts.db, maxProfiles, }); if (opts.cloudflare.enable) { ...
sc2pte/panel-backend
src/index.ts
TypeScript
InterfaceDeclaration
interface ServerOptions { app: { urlPrefix: string; }; db: { uri: string; }; redis: { ttl: number; }; twitch: TwitchPluginOptions; sas: SasOptions; maxProfiles: number; cloudflare: { enable: boolean; token: string; zoneId: string; productionDomain: string; viewerRout...
sc2pte/panel-backend
src/index.ts
TypeScript
ArrowFunction
_type => SongCreateWithoutSongInMovieInput
lewisblackburn/CSNEA2021
packages/backend/src/generated/type-graphql/resolvers/inputs/SongCreateNestedOneWithoutSongInMovieInput.ts
TypeScript
ArrowFunction
_type => SongCreateOrConnectWithoutSongInMovieInput
lewisblackburn/CSNEA2021
packages/backend/src/generated/type-graphql/resolvers/inputs/SongCreateNestedOneWithoutSongInMovieInput.ts
TypeScript
ArrowFunction
_type => SongWhereUniqueInput
lewisblackburn/CSNEA2021
packages/backend/src/generated/type-graphql/resolvers/inputs/SongCreateNestedOneWithoutSongInMovieInput.ts
TypeScript
ClassDeclaration
@TypeGraphQL.InputType({ isAbstract: true }) export class SongCreateNestedOneWithoutSongInMovieInput { @TypeGraphQL.Field(_type => SongCreateWithoutSongInMovieInput, { nullable: true }) create?: SongCreateWithoutSongInMovieInput | undefined; @TypeGraphQL.Field(_type => SongCreateOrConnectWithoutSongInMo...
lewisblackburn/CSNEA2021
packages/backend/src/generated/type-graphql/resolvers/inputs/SongCreateNestedOneWithoutSongInMovieInput.ts
TypeScript
ClassDeclaration
export default class UnlockableRowInfoProvider extends InfoProvider { private readonly getter; private contentHandler?; constructor(getter: () => number); setContent(handler?: ContentHandler | InfoProvider | Translation): this; get(context: InfoProviderContext): ArrayOr<TranslationGenerator<import(...
WaywardGame/types
definitions/game/game/inspection/infoProviders/UnlockableRowInfoProvider.d.ts
TypeScript
TypeAliasDeclaration
declare type ContentHandler = (context: InfoProviderContext, provider: UnlockableRowInfoProvider) => ArrayOr<TranslationGenerator | InfoProvider>;
WaywardGame/types
definitions/game/game/inspection/infoProviders/UnlockableRowInfoProvider.d.ts
TypeScript
MethodDeclaration
setContent(handler?: ContentHandler | InfoProvider | Translation): this;
WaywardGame/types
definitions/game/game/inspection/infoProviders/UnlockableRowInfoProvider.d.ts
TypeScript
MethodDeclaration
get(context: InfoProviderContext): ArrayOr<TranslationGenerator<import("../../../language/dictionary/UiTranslation").default, []> | InfoProvider>;
WaywardGame/types
definitions/game/game/inspection/infoProviders/UnlockableRowInfoProvider.d.ts
TypeScript
MethodDeclaration
getClass(): string[];
WaywardGame/types
definitions/game/game/inspection/infoProviders/UnlockableRowInfoProvider.d.ts
TypeScript
MethodDeclaration
initComponent(context: InfoProviderContext): { component: import("../../../ui/component/Component").default<HTMLElement>; fullInit(): void; };
WaywardGame/types
definitions/game/game/inspection/infoProviders/UnlockableRowInfoProvider.d.ts
TypeScript
MethodDeclaration
protected onRefresh(): void;
WaywardGame/types
definitions/game/game/inspection/infoProviders/UnlockableRowInfoProvider.d.ts
TypeScript
ClassDeclaration
@Component({ selector: 'sbb-icon-sa-sn', // tslint:disable:max-line-length template: ` <svg focusable="false" [attr.class]="'sbb-svg-icon ' + svgClass" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 26 16" > <path fill-rule="evenodd" d="M3.307 14.267c-.35-.5...
davide1995/sbb-angular
projects/sbb-esta/angular-icons/src/lib/timetable-attributes/icon-sa-sn.module.ts
TypeScript
ClassDeclaration
@NgModule({ imports: [CommonModule], declarations: [IconSaSnComponent], exports: [IconSaSnComponent] }) export class IconSaSnModule {}
davide1995/sbb-angular
projects/sbb-esta/angular-icons/src/lib/timetable-attributes/icon-sa-sn.module.ts
TypeScript
FunctionDeclaration
async function fetchMyCAPTCHA() { const res = await fetch('/api/captcha', { method: 'POST', credentials: 'include', headers: { Accept: 'application/json', 'Content-Type': 'application/json', }, body: JSON.stringify({ page: 'login' }) }); if (res.status === 200...
FORTH-ICS-INSPIRE/artemis-web
apps/artemis-web/components/login/login.tsx
TypeScript
FunctionDeclaration
async function onClick(e, endpoint) { e.preventDefault(); const res = await fetch(endpoint, { method: 'POST', credentials: 'include', headers: { Accept: 'application/json', 'Content-Type': 'application/json', }, body: JSON.stringify({ ...formData, _csrf: props._cs...
FORTH-ICS-INSPIRE/artemis-web
apps/artemis-web/components/login/login.tsx
TypeScript
ArrowFunction
(props: any): any => { const [errorMsg, setErrorMsg] = useState(''); const [formData, setFormData] = useState({ email: '', password: '', rememberMe: false, captcha: '' }); async function fetchMyCAPTCHA() { const res = await fetch('/api/captcha', { method: 'POST', credentials: '...
FORTH-ICS-INSPIRE/artemis-web
apps/artemis-web/components/login/login.tsx
TypeScript
ArrowFunction
() => { fetchMyCAPTCHA(); }
FORTH-ICS-INSPIRE/artemis-web
apps/artemis-web/components/login/login.tsx
TypeScript
ArrowFunction
(props) => { const classes = useStyles(); return <Login {...props} classes={classes} />; }
FORTH-ICS-INSPIRE/artemis-web
apps/artemis-web/components/login/login.tsx
TypeScript
ArrowFunction
() => ({ cart: {}, displayCart: [] } as State)
Pepe1776/monsteria-vitesse
src/stores/cart.ts
TypeScript
ArrowFunction
(ci : Product) => { if (ci.id === product.id) { isAdded = true return { id: ci.id, qty: ci.qty + 1 } } return { id: ci.id, qty: ci.qty } }
Pepe1776/monsteria-vitesse
src/stores/cart.ts
TypeScript
ArrowFunction
ci => ci.id !== id
Pepe1776/monsteria-vitesse
src/stores/cart.ts
TypeScript
ArrowFunction
ci => { const requiredProduct = productData.filter(p => p.id === ci.id) // if (requiredProduct[0].stock >= ci.qty) return { id: ci.id, name: requiredProduct[0].name, price: requiredProduct[0].price, qty: ci.qty, color: requiredProduct[0].color, ...
Pepe1776/monsteria-vitesse
src/stores/cart.ts
TypeScript
ArrowFunction
p => p.id === ci.id
Pepe1776/monsteria-vitesse
src/stores/cart.ts
TypeScript
InterfaceDeclaration
// interface Cart { // cid: string // products: Array<{id: number, qty: number}> // } interface State{ cart: Cart | {} displayCart: DisplayCart [] | [] }
Pepe1776/monsteria-vitesse
src/stores/cart.ts
TypeScript
MethodDeclaration
loadCartInstance() { const cs = localStorage.getItem('cart') if (!cs) this.cart = {} else this.cart = JSON.parse(cs) }
Pepe1776/monsteria-vitesse
src/stores/cart.ts
TypeScript
MethodDeclaration
addToCart(product: Product) { const cs = localStorage.getItem('cart') let isAdded = false if (!cs) { this.cart = { cid: uuid4(), products: [product], } } else { const cartLocalStorage = JSON.parse(cs) cartLocalStorage.products = cartLoc...
Pepe1776/monsteria-vitesse
src/stores/cart.ts
TypeScript
MethodDeclaration
removeFromCart(id: number) { (this.cart as Cart).products = (this.cart as Cart).products.filter(ci => ci.id !== id) this.displayCartLoad() localStorage.setItem('cart') }
Pepe1776/monsteria-vitesse
src/stores/cart.ts
TypeScript
MethodDeclaration
displayCartLoad() { this.displayCart = (this.cart as Cart).products.map(ci => { const requiredProduct = productData.filter(p => p.id === ci.id) // if (requiredProduct[0].stock >= ci.qty) return { id: ci.id, name: requiredProduct[0].name, price: requiredProduc...
Pepe1776/monsteria-vitesse
src/stores/cart.ts
TypeScript
FunctionDeclaration
export default function Features(): JSX.Element { const [flow, setFlow] = React.useState([]); return ( <div className='d-flex flex-row'> <RMap className='example-map' initial={{center: fromLonLat([2.364, 48.82]), zoom: 11}}
fogracvxy/rlayers
examples/Features.tsx
TypeScript
ArrowFunction
(p) => `<li className="m-0">${p}</li>`
fogracvxy/rlayers
examples/Features.tsx
TypeScript
MethodDeclaration
useCallback(
fogracvxy/rlayers
examples/Features.tsx
TypeScript
ClassDeclaration
export class IsListOperator extends Operator implements IOperator { /** * Loop while the condition is true. */ public call(engine: Engine, args: Array<any>): Object { if (engine.eval(args[0]) instanceof Array) { return true; } else { return false; } } }
alphaKAI/ChickenClisp_ts
operator/IsListOperator.ts
TypeScript
MethodDeclaration
/** * Loop while the condition is true. */ public call(engine: Engine, args: Array<any>): Object { if (engine.eval(args[0]) instanceof Array) { return true; } else { return false; } }
alphaKAI/ChickenClisp_ts
operator/IsListOperator.ts
TypeScript
FunctionDeclaration
function defineCustomPatternSpec(variant, customPattern) { it(variant, () => { let time = 1 function extraContextValidator( text, offset, toke...
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
FunctionDeclaration
function extraContextValidator( text, offset, tokens, groups ) { let result = isFunction(customPattern) ...
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
FunctionDeclaration
function wrapWithCustom(baseExtendToken) { return function() { let newToken = baseExtendToken.apply(null, arguments) let pattern = newToken.PATTERN if ( isRegExp(pattern) && !/\\n|\\r|\\s/g.test(pattern.source) && pattern !== Lexer.NA ) { ...
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => { it("can create a token from a string with priority to the First Token Type with the longest match #1", () => { // this can match either IdentifierTok or BambaTok but should match BambaTok has its pattern is defined before IdentifierTok let input = "bamba" ...
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => { // this can match either IdentifierTok or BambaTok but should match BambaTok has its pattern is defined before IdentifierTok let input = "bamba" let result = testLexer.tokenize(input) expect(tokenMatcher(result.tokens[0], BambaTok)).to.be.true ...
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => { let input = "bambaMIA" let result = testLexer.tokenize(input) expect(tokenMatcher(result.tokens[0], IdentifierTok)).to.be.true expect(result.tokens[0].image).to.equal("bambaMIA") expect(result.tokens[0].startOffset).to.equal(0) ...
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => { const IntegerTok = createToken({ name: "IntegerTok", pattern: /[1-9]\d*/ }) const IdentTok = createToken({ name: "IdentifierTok", pattern: /[A-Za-z]+/ }) ...
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => { let input = "6666543221231" let result = testLexer.tokenize(input) expect(tokenMatcher(result.tokens[0], IntegerTok)).to.be.true expect(result.tokens[0].image).to.equal("6666543221231") expect(result.tokens[0].startOffset).to.equal...
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => { let result = findMissingPatterns([ BambaTok, IntegerTok, IdentifierTok ]) expect(result.errors).to.be.empty expect(result.valid).to.deep.equal([ ...
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => { let tokenClasses = [ValidNaPattern, MissingPattern] let result = findMissingPatterns(tokenClasses) expect(result.errors.length).to.equal(1) expect(result.errors[0].tokenTypes).to.deep.equal([ MissingPattern ...
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => { let result = findInvalidPatterns([ BambaTok, IntegerTok, IdentifierTok, ValidNaPattern ]) expect(result.errors).to.be.empty expect(resu...
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => { let tokenClasses = [ValidNaPattern, InvalidPattern] let result = findInvalidPatterns(tokenClasses) expect(result.errors.length).to.equal(1) expect(result.errors[0].tokenTypes).to.deep.equal([ InvalidPattern ...
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => { let errors = findUnsupportedFlags([ BambaTok, IntegerTok, IdentifierTok, CaseInsensitivePattern ]) expect(errors).to.be.empty }
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => { let tokenClasses = [ValidNaPattern, MultiLinePattern] let errors = findUnsupportedFlags(tokenClasses) expect(errors.length).to.equal(1) expect(errors[0].tokenTypes).to.deep.equal([ MultiLinePattern ...
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => { let tokenClasses = [ValidNaPattern, GlobalPattern] let errors = findUnsupportedFlags(tokenClasses) expect(errors.length).to.equal(1) expect(errors[0].tokenTypes).to.deep.equal([GlobalPattern]) expect(errors[0].t...
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => { let errors = findDuplicatePatterns([ MultiLinePattern, IntegerValid ]) expect(errors).to.be.empty }
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => { let errors = findDuplicatePatterns([ ValidNaPattern, ValidNaPattern2 ]) expect(errors).to.be.empty }
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => { let InvalidToken = createToken({ name: "InvalidToken", pattern: /BAMBA$/ }) let tokenClasses = [ValidNaPattern, InvalidToken] let errors = findEndOfInputAnchor(tokenClasses) ...
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => { let errors = findEndOfInputAnchor([ IntegerTok, IntegerValid ]) expect(errors).to.be.empty }
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => { let InvalidToken = createToken({ name: "InvalidToken", pattern: /^BAMBA/ }) let tokenClasses = [ValidNaPattern, InvalidToken] let errors = findStartOfInputAnchor(tokenClasses) ...
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => { const ClassKeyword = createToken({ name: "ClassKeyword", pattern: /class/ }) const Identifier = createToken({ name: "Identifier", pattern: /\w+/ ...
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => { let negationPattern = createToken({ name: "negationPattern", pattern: /[^\\]/ }) let errors = findStartOfInputAnchor([negationPattern]) expect(errors).to.be.empty }
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => { let errors = findStartOfInputAnchor([ IntegerTok, IntegerValid ]) expect(errors).to.be.empty }
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => { let tokenClasses = [DecimalInvalid, IntegerValid] let errors = findDuplicatePatterns(tokenClasses) expect(errors.length).to.equal(1) expect(errors[0].tokenTypes).to.deep.equal([ DecimalInvalid, ...
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => { // should use \d+ as * allows zero repetitions const emptyMatch = createToken({ name: "emptyMatch", pattern: /\d*/ }) let tokenClasses = [emptyMatch] let errors =...
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => { let errors = findInvalidGroupType([ IntegerTok, Skipped, Special ]) //noinspection BadExpressionStatementJS expect(errors).to.be.empty }
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => { let tokenClasses = [InvalidGroupNumber] let errors = findInvalidGroupType(tokenClasses) expect(errors.length).to.equal(1) expect(errors[0].tokenTypes).to.deep.equal([ InvalidGroupNumber ]...
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => { it("can transform a pattern to one with startOfInput mark ('^') #1 (NO OP)", () => { let orgSource = (<any>BambaTok.PATTERN).source let transPattern = addStartOfInput(<any>BambaTok.PATTERN) expect(transPattern.source).to.equal("^(?:" + orgSource + ")"...
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => { let orgSource = (<any>BambaTok.PATTERN).source let transPattern = addStartOfInput(<any>BambaTok.PATTERN) expect(transPattern.source).to.equal("^(?:" + orgSource + ")") expect(/^\^/.test(transPattern.source)).to.equal(true) }
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => { let orgSource = PatternNoStart.PATTERN.source let transPattern = addStartOfInput(PatternNoStart.PATTERN) expect(transPattern.source).to.equal("^(?:" + orgSource + ")") expect(/^\^/.test(transPattern.source)).to.equal(true) }
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => { let tokenClasses = [ Keyword, If, Else, Return, Integer, Punctuation, LParen, RParen, ...
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
currConfig => currConfig.pattern
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
pattern => { return isString(pattern) ? pattern : pattern.source }
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
currConfig => currConfig.tokenType
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => { let tokenClasses = [ Keyword, If, Else, Return, Integer, Punctuation, LParen, RParen, ...
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
currPattern => { if (isRegExp(currPattern)) { expect(currPattern.sticky).to.be.true } }
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => { let ltCounter = new Lexer([ createToken({ name: "lt", pattern: /\s+/, line_breaks: true }), createToken({ name: "num", ...
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => { let ltCounter = new Lexer([ createToken({ name: "lt", pattern: "\n", line_breaks: true }), createToken({ name: "num", ...
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => { let WS = createToken({ name: "WS", pattern: /\u2028/, line_breaks: true, group: Lexer.SKIPPED }) let ifElseLexer = new Lexer([WS, If, Else], { lineTerminatorsPatte...
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => { const workflow = createToken({ name: "workflow", pattern: /WORKFLOW/i }) const input = "worKFloW" const lexer = new Lexer([workflow], { positionTracking: "onlyOffset" }) ...
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => { let Tab = createToken({ name: "Tab", pattern: /\t/, group: "spaces" }) let ifElseLexer = new Lexer([Tab, If, Else], { positionTracking: "onlyOffset" }) ...
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => { const IfOrElse = createToken({ name: "IfOrElse", pattern: /if|else/, start_chars_hint: ["i", "e".charCodeAt(0)] }) let ifElseLexer = new Lexer([IfOrElse], { positionTracking: "onlyOff...
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => { let ifElseLexer = new Lexer( [ Keyword, If, Else, Return, Integer, Punctuation, LParen, ...
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => { expect( () => new Lexer([], { positionTracking: <any>"oops" }) ).to.throw( "Invalid <positionTracking> config option:" + ' "oops"' ...
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => new Lexer([], { positionTracking: <any>"oops" })
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => { expect(() => new Lexer([], <any>false)).to.throw( "The second argument to the Lexer constructor is now an ILexerConfig" ) }
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => new Lexer([], <any>false)
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => { expect( () => new Lexer([EndOfInputAnchor, If, Else]), lexerConfig ).to.throw(/Errors detected in definition of Lexer/) expect( () => new Lexer([EndOfInputAnchor, If, Else]), ...
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => new Lexer([EndOfInputAnchor, If, Else])
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => { expect( () => new Lexer([EndOfInputAnchor, If, Else], { deferDefinitionErrorsHandling: true }) ).to.not.throw(/Errors detected in definition of Lexer/) ...
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => new Lexer([EndOfInputAnchor, If, Else], { deferDefinitionErrorsHandling: true })
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => lexerWithErrs.tokenize("else")
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => { let ifElseLexer = new Lexer( [ Keyword, If, Else, Return, Integer, Punctuation, LParen, ...
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => { let ifElseLexer = new Lexer( [ Keyword, If, Else, Return, Integer, Punctuation, LParen, ...
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => { let ifElseLexer = new Lexer( [If, Else, WhitespaceNotSkipped], lexerConfig ) let input = "if\r\r\telse\rif\n" let lexResult = ifElseLexer.tokenize(input) expect(lexResult.tokens[0].image).t...
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => { let ifElseLexer = new Lexer( [If, Else, WhitespaceOrAmp], lexerConfig ) let input = "if\r\r\telse&if" let lexResult = ifElseLexer.tokenize(input) expect(lexResult.tokens[0].image).to.equal(...
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => { let ifElseLexer = new Lexer( [If, Else, Comment, NewLine], lexerConfig ) let input = "if//else" let lexResult = ifElseLexer.tokenize(input) expect(lexResult.tokens[0].image).to.equal("if") ...
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => { let ifElseLexer = new Lexer( [If, Else, Comment, NewLine], lexerConfig ) let input = "if//else" let lexResult = ifElseLexer.tokenize(input) expect(lexResult.groups).to.have.property("comment...
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript
ArrowFunction
() => { let ifElseLexer = new Lexer( [If, PileOfPoo, NewLine], lexerConfig ) let input = "if💩" let lexResult = ifElseLexer.tokenize(input) expect(lexResult.tokens[0].image).to.equal("if") ...
benjie/chevrotain
test/scan/lexer_spec.ts
TypeScript