Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
B Language Extension
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
general
stups
B Language Extension
Commits
964dc608
Commit
964dc608
authored
Jul 15, 2020
by
SeeBasTStick
Browse files
Options
Downloads
Patches
Plain Diff
removed print statements
parent
de7da51a
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
server/src/errorHandler.ts
+0
-4
0 additions, 4 deletions
server/src/errorHandler.ts
server/src/server.ts
+4
-11
4 additions, 11 deletions
server/src/server.ts
with
4 additions
and
15 deletions
server/src/errorHandler.ts
+
0
−
4
View file @
964dc608
...
...
@@ -62,10 +62,8 @@ export function buildErrors(errorLines : Array<string> ): Map<string, Set<NDJSON
*/
export
function
matchErrors
(
infos
:
Set
<
NDJSON
>
,
file
?:
TextDocument
|
undefined
):
Array
<
Diagnostic
>
{
let
result
:
Array
<
Diagnostic
>
=
new
Array
()
console
.
log
(
"
infos
"
+
infos
)
for
(
var
info
of
infos
)
{
console
.
log
(
"
type
"
+
info
.
type
)
let
serveity
:
DiagnosticSeverity
=
DiagnosticSeverity
.
Error
if
(
info
.
type
==
"
error
"
)
{
...
...
@@ -131,8 +129,6 @@ export interface NDJSON {
start
:
StartOrEnd
end
:
StartOrEnd
prob_version
:
string
// main_file : string
// dependencies : Array<string>
}
...
...
This diff is collapsed.
Click to expand it.
server/src/server.ts
+
4
−
11
View file @
964dc608
...
...
@@ -175,8 +175,8 @@ async function validateTextDocument(textDocument: TextDocument): Promise<void> {
let
documentPath
:
path
.
ParsedPath
=
path
.
parse
(
URI
.
parse
(
textDocument
.
uri
).
path
);
let
errorDic
:
string
=
documentPath
.
dir
+
'
/
tmp
'
let
errorPath
:
string
=
errorDic
+
'
/
_error.json
'
let
errorDic
:
string
=
documentPath
.
dir
+
path
.
sep
+
'
tmp
'
let
errorPath
:
string
=
errorDic
+
path
.
sep
+
'
_error.json
'
const
{
exec
}
=
require
(
'
child_process
'
);
...
...
@@ -206,19 +206,13 @@ async function validateTextDocument(textDocument: TextDocument): Promise<void> {
for
(
let
dependency
of
allFilesAndCorrespondingErrors
.
keys
())
{
console
.
log
(
dependency
)
console
.
log
(
documentPath
.
dir
+
documentPath
.
name
+
documentPath
.
ext
)
if
(
dependency
==
(
documentPath
.
dir
+
documentPath
.
name
+
documentPath
.
ext
)){
console
.
log
(
"
is:main
"
)
if
(
dependency
==
(
documentPath
.
dir
+
path
.
sep
+
documentPath
.
name
+
documentPath
.
ext
)){
let
errors
:
Set
<
NDJSON
>
=
allFilesAndCorrespondingErrors
.
get
(
dependency
)
!!
console
.
log
(
"
errors
"
+
errors
)
let
diagnostics
=
matchErrors
(
errors
,
textDocument
)
connection
.
sendDiagnostics
({
uri
:
dependency
,
diagnostics
});
}
else
{
console
.
log
(
"
is:dep
"
)
let
errors
:
Set
<
NDJSON
>
=
allFilesAndCorrespondingErrors
.
get
(
dependency
)
!!
let
diagnostics
=
matchErrors
(
errors
)
console
.
log
(
"
errors
"
+
errors
)
connection
.
sendDiagnostics
({
uri
:
dependency
,
diagnostics
});
}
}
...
...
@@ -227,7 +221,6 @@ async function validateTextDocument(textDocument: TextDocument): Promise<void> {
for
(
let
dependency
of
filesToReset
)
{
console
.
log
(
"
reset:errrors
"
)
let
diagnostics
:
Array
<
Diagnostic
>
=
new
Array
()
connection
.
sendDiagnostics
({
uri
:
dependency
,
diagnostics
});
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment