Skip to content

Commit

Permalink
Narrows some types
Browse files Browse the repository at this point in the history
  • Loading branch information
markwpearce committed Aug 30, 2023
1 parent 0e1106c commit 6429017
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/bscPlugin/CallExpressionInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class CallExpressionInfo {
expression?: Expression;

//the contextually relevant callExpression, which relates to it
callExpression?: CallExpression;
callExpression?: CallExpression | CallfuncExpression;
type: CallExpressionType;

file: BrsFile;
Expand Down
4 changes: 2 additions & 2 deletions src/parser/Statement.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable no-bitwise */
import type { Token, Identifier } from '../lexer/Token';
import { CompoundAssignmentOperators, TokenKind } from '../lexer/TokenKind';
import type { BinaryExpression, FunctionExpression, FunctionParameterExpression, LiteralExpression, TypeExpression } from './Expression';
import type { BinaryExpression, DottedGetExpression, FunctionExpression, FunctionParameterExpression, LiteralExpression, TypeExpression } from './Expression';
import { CallExpression, VariableExpression } from './Expression';
import { util } from '../util';
import type { Range } from 'vscode-languageserver';
Expand Down Expand Up @@ -1193,7 +1193,7 @@ export class NamespaceStatement extends Statement implements TypedefProvider {
constructor(
public keyword: Token,
// this should technically only be a VariableExpression or DottedGetExpression, but that can be enforced elsewhere
public nameExpression: Expression,
public nameExpression: VariableExpression | DottedGetExpression,
public body: Body,
public endKeyword: Token
) {
Expand Down

0 comments on commit 6429017

Please sign in to comment.