Skip to content

Commit d378470

Browse files
committed
Remove implied public modifier.
1 parent 509f1e8 commit d378470

File tree

4 files changed

+42
-42
lines changed

4 files changed

+42
-42
lines changed

src/cxxrtl/client.ts

+15-15
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export class Connection {
4040
});
4141
}
4242

43-
public dispose(): void {
43+
dispose(): void {
4444
this.link.dispose();
4545
}
4646

@@ -126,53 +126,53 @@ export class Connection {
126126
});
127127
}
128128

129-
public async onConnected(): Promise<void> {}
129+
async onConnected(): Promise<void> {}
130130

131-
public async onDisconnected(): Promise<void> {}
131+
async onDisconnected(): Promise<void> {}
132132

133-
public async onEvent(_event: proto.AnyEvent): Promise<void> {}
133+
async onEvent(_event: proto.AnyEvent): Promise<void> {}
134134

135-
public get state(): ConnectionState {
135+
get state(): ConnectionState {
136136
return this._state;
137137
}
138138

139-
public get commands(): string[] {
139+
get commands(): string[] {
140140
return this._commands.slice();
141141
}
142142

143-
public get events(): string[] {
143+
get events(): string[] {
144144
return this._events.slice();
145145
}
146146

147-
public get itemValuesEncodings(): string[] {
147+
get itemValuesEncodings(): string[] {
148148
return this._itemValuesEncodings.slice();
149149
}
150150

151-
public async listScopes(command: proto.CommandListScopes): Promise<proto.ResponseListScopes> {
151+
async listScopes(command: proto.CommandListScopes): Promise<proto.ResponseListScopes> {
152152
return await this.perform(command) as proto.ResponseListScopes;
153153
}
154154

155-
public async listItems(command: proto.CommandListItems): Promise<proto.ResponseListItems> {
155+
async listItems(command: proto.CommandListItems): Promise<proto.ResponseListItems> {
156156
return await this.perform(command) as proto.ResponseListItems;
157157
}
158158

159-
public async referenceItems(command: proto.CommandReferenceItems): Promise<proto.ResponseReferenceItems> {
159+
async referenceItems(command: proto.CommandReferenceItems): Promise<proto.ResponseReferenceItems> {
160160
return await this.perform(command) as proto.ResponseReferenceItems;
161161
}
162162

163-
public async queryInterval(command: proto.CommandQueryInterval): Promise<proto.ResponseQueryInterval> {
163+
async queryInterval(command: proto.CommandQueryInterval): Promise<proto.ResponseQueryInterval> {
164164
return await this.perform(command) as proto.ResponseQueryInterval;
165165
}
166166

167-
public async getSimulationStatus(command: proto.CommandGetSimulationStatus): Promise<proto.ResponseGetSimulationStatus> {
167+
async getSimulationStatus(command: proto.CommandGetSimulationStatus): Promise<proto.ResponseGetSimulationStatus> {
168168
return await this.perform(command) as proto.ResponseGetSimulationStatus;
169169
}
170170

171-
public async runSimulation(command: proto.CommandRunSimulation): Promise<proto.ResponseRunSimulation> {
171+
async runSimulation(command: proto.CommandRunSimulation): Promise<proto.ResponseRunSimulation> {
172172
return await this.perform(command) as proto.ResponseRunSimulation;
173173
}
174174

175-
public async pauseSimulation(command: proto.CommandPauseSimulation): Promise<proto.ResponsePauseSimulation> {
175+
async pauseSimulation(command: proto.CommandPauseSimulation): Promise<proto.ResponsePauseSimulation> {
176176
return await this.perform(command) as proto.ResponsePauseSimulation;
177177
}
178178
}

src/cxxrtl/link.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ export class MockLink implements ILink {
1616
private conversation: [proto.ClientPacket, proto.ServerPacket | proto.ServerPacket[]][]
1717
) {}
1818

19-
public dispose(): void {
19+
dispose(): void {
2020
if (this.conversation.length !== 0) {
2121
throw new Error('disposed of before end of conversation');
2222
}
2323
}
2424

25-
public async onRecv(_serverPacket: proto.ServerPacket): Promise<void> {}
25+
async onRecv(_serverPacket: proto.ServerPacket): Promise<void> {}
2626

27-
public async onDone(): Promise<void> {}
27+
async onDone(): Promise<void> {}
2828

29-
public async send(clientPacket: proto.ClientPacket): Promise<void> {
29+
async send(clientPacket: proto.ClientPacket): Promise<void> {
3030
if (this.conversation.length === 0) {
3131
throw new Error('premature end of conversation');
3232
}
@@ -109,15 +109,15 @@ export class NodeStreamLink implements ILink {
109109
}
110110
}
111111

112-
public dispose(): void {
112+
dispose(): void {
113113
this.stream.destroy();
114114
}
115115

116-
public async onRecv(_serverPacket: proto.ServerPacket): Promise<void> {}
116+
async onRecv(_serverPacket: proto.ServerPacket): Promise<void> {}
117117

118-
public async onDone(): Promise<void> {}
118+
async onDone(): Promise<void> {}
119119

120-
public async send(clientPacket: proto.ClientPacket): Promise<void> {
120+
async send(clientPacket: proto.ClientPacket): Promise<void> {
121121
this.stream.write(JSON.stringify(clientPacket) + '\0');
122122
}
123123
}

src/debugger.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ export enum CXXRTLSessionStatus {
1919
export class CXXRTLDebugger {
2020
private statusBarItem: StatusBarItem;
2121
private terminal: vscode.Terminal | null = null;
22-
public session: Session | null = null;
22+
session: Session | null = null;
2323

2424
// Session properties.
2525

2626
private _onDidChangeSession: vscode.EventEmitter<Session | null> = new vscode.EventEmitter<Session | null>();
2727
readonly onDidChangeSession: vscode.Event<Session | null> = this._onDidChangeSession.event;
2828

2929
private _sessionStatus: CXXRTLSessionStatus = CXXRTLSessionStatus.Absent;
30-
public get sessionStatus() {
30+
get sessionStatus() {
3131
return this._sessionStatus;
3232
}
3333
private _onDidChangeSessionStatus: vscode.EventEmitter<CXXRTLSessionStatus> = new vscode.EventEmitter<CXXRTLSessionStatus>();
@@ -36,7 +36,7 @@ export class CXXRTLDebugger {
3636
// Simulation properties.
3737

3838
private _simulationStatus: CXXRTLSimulationStatus = CXXRTLSimulationStatus.Finished;
39-
public get simulationStatus() {
39+
get simulationStatus() {
4040
return this._simulationStatus;
4141
}
4242
private _onDidChangeSimulationStatus: vscode.EventEmitter<CXXRTLSimulationStatus> = new vscode.EventEmitter<CXXRTLSimulationStatus>();
@@ -46,12 +46,12 @@ export class CXXRTLDebugger {
4646
this.statusBarItem = new StatusBarItem(this);
4747
}
4848

49-
public dispose() {
49+
dispose() {
5050
this.statusBarItem.dispose();
5151
this._onDidChangeSimulationStatus.dispose();
5252
}
5353

54-
public async startSession(): Promise<void> {
54+
async startSession(): Promise<void> {
5555
if (this.terminal !== null) {
5656
vscode.window.showErrorMessage('A debug session is already in the process of being started.');
5757
return;
@@ -116,7 +116,7 @@ export class CXXRTLDebugger {
116116
}
117117
}
118118

119-
public stopSession() {
119+
stopSession() {
120120
this._onDidChangeSession.fire(null);
121121

122122
this.terminal?.dispose();

src/model/time.ts

+13-13
Original file line numberDiff line numberDiff line change
@@ -10,35 +10,35 @@ export class TimePoint {
1010
this.#raw = secs * TimePoint.RESOLUTION + femtos;
1111
}
1212

13-
public get secs(): bigint {
13+
get secs(): bigint {
1414
return this.#raw / TimePoint.RESOLUTION;
1515
}
1616

17-
public get femtos(): bigint {
17+
get femtos(): bigint {
1818
return this.#raw % TimePoint.RESOLUTION;
1919
}
2020

21-
public equals(other: TimePoint): boolean {
21+
equals(other: TimePoint): boolean {
2222
return this.#raw === other.#raw;
2323
}
2424

25-
public greaterThan(other: TimePoint): boolean {
25+
greaterThan(other: TimePoint): boolean {
2626
return this.#raw > other.#raw;
2727
}
2828

29-
public lessThan(other: TimePoint): boolean {
29+
lessThan(other: TimePoint): boolean {
3030
return this.#raw < other.#raw;
3131
}
3232

33-
public offsetByFemtos(femtos: bigint): TimePoint {
33+
offsetByFemtos(femtos: bigint): TimePoint {
3434
return new TimePoint(this.secs, this.femtos + femtos);
3535
}
3636

37-
public differenceInFemtos(other: TimePoint): bigint {
37+
differenceInFemtos(other: TimePoint): bigint {
3838
return this.#raw - other.#raw;
3939
}
4040

41-
public toString(): string {
41+
toString(): string {
4242
function groupDecimals(num: bigint) {
4343
const groups: string[] = [];
4444
if (num === 0n) {
@@ -70,7 +70,7 @@ export class TimePoint {
7070
}
7171
}
7272

73-
public static fromString(value: string): TimePoint {
73+
static fromString(value: string): TimePoint {
7474
const matches = value.match(/^(\d+)\s*(s|ms|us|ns|ps|fs)$/);
7575
if (matches === null) {
7676
throw new SyntaxError(`${JSON.stringify(value)} is not a valid time point`);
@@ -94,27 +94,27 @@ export class TimePoint {
9494
}
9595
}
9696

97-
public static fromCXXRTL(value: string): TimePoint {
97+
static fromCXXRTL(value: string): TimePoint {
9898
const matches = value.match(/^(\d+)\.(\d+)$/);
9999
if (matches === null) {
100100
throw new SyntaxError(`${JSON.stringify(value)} is not a valid time point`);
101101
}
102102
return new TimePoint(BigInt(matches[1]), BigInt(matches[2]));
103103
}
104104

105-
public toCXXRTL(): string {
105+
toCXXRTL(): string {
106106
return `${this.secs.toString()}.${this.femtos.toString().padStart(15, '0')}`;
107107
}
108108
}
109109

110110
export class TimeInterval {
111111
constructor(public begin: TimePoint, public end: TimePoint) {}
112112

113-
public static fromCXXRTL([begin, end]: [string, string]): TimeInterval {
113+
static fromCXXRTL([begin, end]: [string, string]): TimeInterval {
114114
return new TimeInterval(TimePoint.fromCXXRTL(begin), TimePoint.fromCXXRTL(end));
115115
}
116116

117-
public toCXXRTL(): [string, string] {
117+
toCXXRTL(): [string, string] {
118118
return [this.begin.toCXXRTL(), this.end.toCXXRTL()];
119119
}
120120
}

0 commit comments

Comments
 (0)