Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeScriptParser cannot parse constructor method in a class declaration #4121

Closed
vlebedev opened this issue Oct 22, 2024 · 1 comment
Closed

Comments

@vlebedev
Copy link

When trying to build a model of my TypeScript codebase, I got the following error:
Screenshot 2024-10-22 150259

The offending source file is the following:

import * as Lint from 'tslint';
import * as ts from 'typescript';
import { NgWalker } from './angular/ngWalker';
import { ComponentMetadata, DirectiveMetadata } from './angular/metadata';
export declare class Rule extends Lint.Rules.AbstractRule {
    static metadata: Lint.IRuleMetadata;
    static FAILURE_STRING: string;
    apply(sourceFile: ts.SourceFile): Lint.RuleFailure[];
}
export declare class ClassMetadataWalker extends NgWalker {
    private rule;
    className: string;
    isInjectable: boolean;
    isComponent: boolean;
    isDirective: boolean;
    isPipe: boolean;
    constructor(sourceFile: ts.SourceFile, rule: Rule);
    visitNgInjectable(controller: ts.ClassDeclaration, decorator: ts.Decorator): void;
    visitNgComponent(metadata: ComponentMetadata): void;
    visitNgDirective(metadata: DirectiveMetadata): void;
    visitNgPipe(controller: ts.ClassDeclaration, decorator: ts.Decorator): void;
    visitMethodDeclaration(method: ts.MethodDeclaration): void;
    private generateFailure(start, width, failureConfig);
}

It looks like that TypeScriptParser cannot parse TypeScript class constructor. Few more screenshots, just in case:
Screenshot 2024-10-22 150543
Screenshot 2024-10-22 150510

j-brant added a commit to j-brant/SmaCC that referenced this issue Oct 22, 2024
j-brant added a commit to feenkcom/gt4famix3 that referenced this issue Oct 22, 2024
@j-brant
Copy link
Member

j-brant commented Oct 22, 2024

I fixed a couple things and was able to import the above file.

@j-brant j-brant closed this as completed Oct 22, 2024
syrel pushed a commit that referenced this issue Oct 22, 2024
Metacello new
    baseline: 'GToolkitForPharo9';
    repository: 'github://feenkcom/gtoolkit:v1.0.1233/src';
    load

All commits (including upstream repositories) since last build:
feenkcom/gtoolkit-utility@6ef4f5 by Alistair Grant
Add GtOsSystemInfoExamples>>findPing


feenkcom/gtoolkit-utility@9211e3 by Alistair Grant
Add GtOsSystemInfo>>findExecutable:


feenkcom/gtoolkit-utility@461b6f by Andrei Chi�
Fix class comment

feenkcom/gtoolkit-utility@87a961 by Andrei Chi�
[#4072] Pass on the analysis for extension methods

feenkcom/gtoolkit-coder@c65155 by Juraj Kubelka
fix examples [#3983]


feenkcom/gtoolkit-coder@a085c5 by Juraj Kubelka
Merge a6c0fe0ab39cd8ff9fed170f14981ef9fd0411ae


feenkcom/gtoolkit-coder@a939c1 by Juraj Kubelka
distinguish between coder and filter search filters [#3983]


feenkcom/gtoolkit-coder@a6c0fe by Aliaksei Syrel
[#4089] support moving a method from instance to class side by dragging on a protocol

feenkcom/gtoolkit-coder@0dd36d by Aliaksei Syrel
Merge efc4c7a65913fbad1f272b19281721d25441321c

feenkcom/gtoolkit-coder@1e2311 by Aliaksei Syrel
[#4088] support moving a method to `as yet unclassified` protocol

feenkcom/gtoolkit-coder@efc4c7 by Juraj Kubelka
fix `GtFilterDefaultSearchFilters` [#3983]


feenkcom/gtoolkit-coder@953947 by Juraj Kubelka
fix `GtFilterDefaultSearchFilters` [#3983]


feenkcom/gtoolkit-coder@dbf2bb by Juraj Kubelka
add `GtFilterDefaultSearchFilters` [#3983]


feenkcom/gtoolkit-coder@ff1340 by Juraj Kubelka
add a search filter requester context setter [#3983]


feenkcom/gtoolkit-coder@249692 by Aliaksei Syrel
Merge e0eb47eaec76249fa854504e0b77118110e0f3f7

feenkcom/gtoolkit-coder@88b2d2 by Aliaksei Syrel
[#4097] don't cache extended classes in an extension tag

j-brant/SmaCC@6ba455 by John Brant
[#4121] reworking constructor declaration node for typescript

feenkcom/gt4pharo@42e042 by Juraj Kubelka
fix dependencies [#3983]


feenkcom/gt4pharo@b25376 by Juraj Kubelka
fix examples [#3983]


feenkcom/gt4pharo@013a42 by Juraj Kubelka
distinguish between coder and filter search filters [#3983]


feenkcom/gt4pharo@bcce1e by Juraj Kubelka
use `GtFilterDefaultSearchFilters` [#3983]


feenkcom/gt4pharo@ab46b2 by Juraj Kubelka
fix examples [#3983]


feenkcom/gt4pharo@fd0e47 by Juraj Kubelka
add Category filter explicitly in methods coder [#3983]


feenkcom/gt4pharo@0c02dc by Juraj Kubelka
default filter models must be added as additional filters in methods coder [#3983]


feenkcom/gt4pharo@aab686 by Juraj Kubelka
new new filter UI widgets as default [#3983]


feenkcom/gt4pharo@478cf2 by Juraj Kubelka
set hierarchy implementors/references scope [#3983]


feenkcom/gt4pharo@25959b by Juraj Kubelka
add inspect filter button [#3983]


feenkcom/gt4pharo@21e3ee by Juraj Kubelka
`gtFilterTypes` views use `#addOrReplaceFilter:` [#3983]


feenkcom/gt4pharo@7c1d74 by Juraj Kubelka
`Category` filter as default [#3983]


feenkcom/gt4pharo@e0e6ef by Juraj Kubelka
Add class hierarchy and class scopes [#3983]


feenkcom/gt4pharo@c36ca3 by Juraj Kubelka
Merge 438ba4f5aac6b9dc019ba43b150d1c6a7a2f6a7d


feenkcom/gt4pharo@fdabec by Juraj Kubelka
Cover scope search filter [#3983]


feenkcom/gt4pharo@438ba4 by Aliaksei Syrel
Merge bac8bcee001851850473663428d0f335a582b657

feenkcom/gt4pharo@835824 by Aliaksei Syrel
[#4097] only show instanceSide of extended classes in the navigation

feenkcom/PharoLink@6db5e5 by Alistair Grant
[#4072] Use Symbol keys for bindings.


feenkcom/PythonBridge@9c5546 by Sven Van Caekenberghe
Use GtOsSystemInfo>>#findExecutable: in PBPharoPipenvPathFinder class>>#resolvePipenvPath


feenkcom/PythonBridge@2cedbe by Sven Van Caekenberghe
Make PBPharoPipenvPathFinder class>>#macOSSearchPath a bit more robust [#3538]


feenkcom/PythonBridge@56a91b by Sven Van Caekenberghe
Add new PBPharoPipenvPathFinder class>>#macOSSearchPath to support PBPharoPipenvPathFinder class>>#resolvePipenvPath by opening a login shell to figure out the user's full path which is necessary when running an end user GT on macOS started by double clicking since that has a limited search path #3538


feenkcom/gtoolkit-visualizer@db76a1 by Don Roberts
Fix failing examples


feenkcom/gtoolkit-visualizer@ee3b42 by Don Roberts
Fix dominance tree layout with cycles [[#4114]]


feenkcom/lepiter@1ea82b by Alistair Grant
GtShellScriptProcess: don't assume bash location


feenkcom/gtoolkit-demos@a0db11 by Juraj Kubelka
fix examples [#3983]


feenkcom/gtoolkit-demos@12ed5f by Juraj Kubelka
fix a slide [#3983]


feenkcom/gt4famix3@11ace5 by John Brant
[#4121] importing method signatures

feenkcom/iceberg-git-cli@fffbba by Sven Van Caekenberghe
Add PureGitBlameLine>>#history


feenkcom/iceberg-git-cli@850340 by Sven Van Caekenberghe
Extend PureGitBlameLine so that it knows its path


feenkcom/iceberg-git-cli@94e70d by Sven Van Caekenberghe
Added new/old contents line access to UnifiedDiffChangeChunk


feenkcom/iceberg-git-cli@3a3d0b by Sven Van Caekenberghe
Implemented PureGitLocalBranch>>#push


feenkcom/gt4git@5b5994 by Sven Van Caekenberghe
Show commit comment in PureGitBlameLine>>#gtDetailsFor:


feenkcom/gt4git@90320c by Sven Van Caekenberghe
Add PureGitBlameLine>>#gtHistoryFor:


feenkcom/gt4git@cba84e by Sven Van Caekenberghe
Extend PureGitBlameLine so that it knows its path


feenkcom/gt4git@124a3c by Sven Van Caekenberghe
Added PureGitPackage>>#gtActionSetLoadedCommitFor:


feenkcom/gt4git@3355a5 by Sven Van Caekenberghe
Reordering some git gtViews' priorities


feenkcom/gt4git@0a4ed4 by Sven Van Caekenberghe
Added GtLepiterWorkingCopy>>#gtViewDetailsIn:


feenkcom/gt4git@0ce222 by Sven Van Caekenberghe
Added an inspect button to GtGitRepositoryElement's toolbar


feenkcom/gt4git@cb6586 by Sven Van Caekenberghe
Added push to PureGitLocalBranch>>#gtOperations


feenkcom/gt4git@725634 by Sven Van Caekenberghe
Added IceWorkingCopy>>#gtActionRepairFor:


feenkcom/gt4git@667acb by Sven Van Caekenberghe
A set of extra gtViews for (internal) Iceberg classes


feenkcom/gt4git@f36856 by Sven Van Caekenberghe
Add AbstractFileReference>>#gtActionGitRepositoryFor:


feenkcom/gtoolkit-world@3ed2b9 by Juraj Kubelka
do not duplicate the inspect filter button [#3983]


feenkcom/gtoolkit-world@e97b82 by Juraj Kubelka
improve scopes view [#3983]


feenkcom/gtoolkit-world@2542b8 by Juraj Kubelka
add inspect filter button [#3983]


feenkcom/gtoolkit-world@c125b3 by Andrei Chi�
Merge 83c4fe8cd72545ebb3786f313e108f49606db547

feenkcom/gtoolkit-world@27701a by Andrei Chi�
Set the knowledgebase when opening a world with spaces

feenkcom/gt4gemstone@9f8a37 by Alistair Grant
[#4072] Use string keys for properties.


c44b56 by Sven Van Caekenberghe
Add some notes about the implementation of PBPharoPipenvPathFinder to the [Python Bridge troubleshooting] GT book page


e2fe13 by Sven Van Caekenberghe
Added book page [How to use the Pure Git tool]


96ea84 by Sven Van Caekenberghe
Update book page [Using Libgit-CLI as an alternative to Libgit2 FFI in Iceberg]


deab1a by Andrei Chi�
Merge b4c2ee6

ae69e1 by Andrei Chi�
[#4072] Pass on the analysis for extension methods
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants