Skip to content

Commit

Permalink
[docs] Add documentation scrape test.
Browse files Browse the repository at this point in the history
Fairly simple script that scrapes code blocks out of the documentation and runs
them through the DSL interpreter main binary -- already found a bunch of places
there were inconsistencies!

Should generally help make sure our docs are more up to date and sound.

For future work, for DSLX "snippets" (things that are not complete code blocks
that are displayed, but that are used to show DSL constructs), we may want to
define a "hidden" prelude before the snippet that makes the block executable,
and have some way to delimit what subset of the snippet is shown when rendered.

Fixes #378

PiperOrigin-RevId: 375183932
  • Loading branch information
cdleary authored and copybara-github committed May 21, 2021
1 parent 96f23af commit 4fb2ae1
Show file tree
Hide file tree
Showing 5 changed files with 190 additions and 56 deletions.
25 changes: 25 additions & 0 deletions docs_src/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright 2021 The XLS Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Targets for documentation files.

package(
default_visibility = ["//xls:xls_internal"],
licenses = ["notice"], # Apache 2.0
)

filegroup(
name = "dslx_reference",
srcs = ["dslx_reference.md"],
)
Loading

0 comments on commit 4fb2ae1

Please sign in to comment.